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 | 6b6a2ac6ca5aada4ff3d6882e0570338baed5a8b (patch) | |
tree | e07b87d1477a81a8084ef12e548ac0642e0f9241 | |
parent | 2982c08884a30e868f74b8824b5b456a3cb544c9 (diff) | |
download | llvm-6b6a2ac6ca5aada4ff3d6882e0570338baed5a8b.tar.gz llvm-6b6a2ac6ca5aada4ff3d6882e0570338baed5a8b.tar.bz2 llvm-6b6a2ac6ca5aada4ff3d6882e0570338baed5a8b.tar.xz |
DebugInfoFinder: handle imported entities of a CU.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189158 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/IR/DebugInfo.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/IR/DebugInfo.cpp b/lib/IR/DebugInfo.cpp index de3360129a..fdd8d537ce 100644 --- a/lib/IR/DebugInfo.cpp +++ b/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; } |