[llvm] r189158 - DebugInfoFinder: handle imported entities of a CU.
Manman Ren
manman.ren at gmail.com
Fri Aug 23 17:32:13 PDT 2013
Author: mren
Date: Fri Aug 23 19:32:12 2013
New Revision: 189158
URL: http://llvm.org/viewvc/llvm-project?rev=189158&view=rev
Log:
DebugInfoFinder: handle imported entities of a CU.
Modified:
llvm/trunk/lib/IR/DebugInfo.cpp
Modified: llvm/trunk/lib/IR/DebugInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/DebugInfo.cpp?rev=189158&r1=189157&r2=189158&view=diff
==============================================================================
--- llvm/trunk/lib/IR/DebugInfo.cpp (original)
+++ llvm/trunk/lib/IR/DebugInfo.cpp Fri Aug 23 19:32:12 2013
@@ -923,6 +923,18 @@ void DebugInfoFinder::processModule(cons
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;
}
More information about the llvm-commits
mailing list