summaryrefslogtreecommitdiff
path: root/lib/CodeGen/CodeGenFunction.cpp
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2014-05-05 23:23:53 +0000
committerDavid Blaikie <dblaikie@gmail.com>2014-05-05 23:23:53 +0000
commitba7ed349fb550bbf11e19094f7755d03258c5499 (patch)
treed6c69b953ef5be65d54a6c91408ebbefa15a2cff /lib/CodeGen/CodeGenFunction.cpp
parentd843795a42095f998d6531f6520c96a14060f1f0 (diff)
downloadclang-ba7ed349fb550bbf11e19094f7755d03258c5499.tar.gz
clang-ba7ed349fb550bbf11e19094f7755d03258c5499.tar.bz2
clang-ba7ed349fb550bbf11e19094f7755d03258c5499.tar.xz
Build debug info for ObjC interface types at the end of the translation unit to ensure all ivars are included.
This takes a different approach than the completedType/requiresCompleteType work which relies on AST callbacks to upgrade the type declaration to a definition. Instead, just defer constructing the definition to the end of the translation unit. This works because the definition is never needed by other debug info (so far as I know), whereas the definition of a struct may be needed by other debug info before the end of the translation unit (such as emitting the definition of a member function which must refer to that member function's declaration). If we had a callback for whenever an IVar was added to an ObjC interface we could use that, and remove the need for the ObjCInterfaceCache, which might be nice. (also would need a callback for when it was more than just a declaration so we could get properties, etc). A side benefit is that we also don't need the CompletedTypeCache anymore. Just rely on the declaration-ness of a type to decide whether its definition is yet to be emitted. There's still the PR19562 memory leak, but this should hopefully make that a bit easier to approach. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@208015 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CodeGenFunction.cpp')
0 files changed, 0 insertions, 0 deletions