diff options
author | Manman Ren <manman.ren@gmail.com> | 2013-08-24 00:32:12 +0000 |
---|---|---|
committer | Manman Ren <manman.ren@gmail.com> | 2013-08-24 00:32:12 +0000 |
commit | 00335ea34e175796dcf819a1428a0e8f5e09f030 (patch) | |
tree | fd24ee52a863a52b191d67e01704640706b75afe /llvm/lib/IR/DebugInfo.cpp | |
parent | 2391fddfc7afce1d7851429cc5be4a92799fd913 (diff) | |
download | bcm5719-llvm-00335ea34e175796dcf819a1428a0e8f5e09f030.tar.gz bcm5719-llvm-00335ea34e175796dcf819a1428a0e8f5e09f030.zip |
DebugInfoFinder: handle imported entities of a CU.
llvm-svn: 189158
Diffstat (limited to 'llvm/lib/IR/DebugInfo.cpp')
-rw-r--r-- | llvm/lib/IR/DebugInfo.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/llvm/lib/IR/DebugInfo.cpp b/llvm/lib/IR/DebugInfo.cpp index de3360129a5..fdd8d537ce4 100644 --- a/llvm/lib/IR/DebugInfo.cpp +++ b/llvm/lib/IR/DebugInfo.cpp @@ -923,6 +923,18 @@ void DebugInfoFinder::processModule(const Module &M) { DIArray RetainedTypes = CU.getRetainedTypes(); for (unsigned i = 0, e = RetainedTypes.getNumElements(); i != e; ++i) processType(DIType(RetainedTypes.getElement(i))); + DIArray Imports = CU.getImportedEntities(); + for (unsigned i = 0, e = Imports.getNumElements(); i != e; ++i) { + DIImportedEntity Import = DIImportedEntity( + Imports.getElement(i)); + DIDescriptor Entity = Import.getEntity(); + if (Entity.isType()) + processType(DIType(Entity)); + else if (Entity.isSubprogram()) + processSubprogram(DISubprogram(Entity)); + else if (Entity.isNameSpace()) + processScope(DINameSpace(Entity).getContext()); + } // FIXME: We really shouldn't be bailing out after visiting just one CU return; } |