mirror of
https://github.com/RPCS3/llvm.git
synced 2025-02-01 16:22:41 +00:00
"there is not any instruction with attached debug info in this module" does not mean "there is no debug info in this module". :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83984 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
5361cd2c7d
commit
549e81f7de
@ -969,8 +969,6 @@ void DebugInfoFinder::processModule(Module &M) {
|
|||||||
#ifdef ATTACH_DEBUG_INFO_TO_AN_INSN
|
#ifdef ATTACH_DEBUG_INFO_TO_AN_INSN
|
||||||
MetadataContext &TheMetadata = M.getContext().getMetadata();
|
MetadataContext &TheMetadata = M.getContext().getMetadata();
|
||||||
unsigned MDDbgKind = TheMetadata.getMDKind("dbg");
|
unsigned MDDbgKind = TheMetadata.getMDKind("dbg");
|
||||||
if (!MDDbgKind)
|
|
||||||
return;
|
|
||||||
#endif
|
#endif
|
||||||
for (Module::iterator I = M.begin(), E = M.end(); I != E; ++I)
|
for (Module::iterator I = M.begin(), E = M.end(); I != E; ++I)
|
||||||
for (Function::iterator FI = (*I).begin(), FE = (*I).end(); FI != FE; ++FI)
|
for (Function::iterator FI = (*I).begin(), FE = (*I).end(); FI != FE; ++FI)
|
||||||
@ -987,15 +985,17 @@ void DebugInfoFinder::processModule(Module &M) {
|
|||||||
else if (DbgDeclareInst *DDI = dyn_cast<DbgDeclareInst>(BI))
|
else if (DbgDeclareInst *DDI = dyn_cast<DbgDeclareInst>(BI))
|
||||||
processDeclare(DDI);
|
processDeclare(DDI);
|
||||||
#ifdef ATTACH_DEBUG_INFO_TO_AN_INSN
|
#ifdef ATTACH_DEBUG_INFO_TO_AN_INSN
|
||||||
else if (MDNode *L = TheMetadata.getMD(MDDbgKind, BI)) {
|
else if (MDDbgKind) {
|
||||||
DILocation Loc(L);
|
if (MDNode *L = TheMetadata.getMD(MDDbgKind, BI)) {
|
||||||
DIScope S(Loc.getScope().getNode());
|
DILocation Loc(L);
|
||||||
if (S.isCompileUnit())
|
DIScope S(Loc.getScope().getNode());
|
||||||
addCompileUnit(DICompileUnit(S.getNode()));
|
if (S.isCompileUnit())
|
||||||
else if (S.isSubprogram())
|
addCompileUnit(DICompileUnit(S.getNode()));
|
||||||
processSubprogram(DISubprogram(S.getNode()));
|
else if (S.isSubprogram())
|
||||||
else if (S.isLexicalBlock())
|
processSubprogram(DISubprogram(S.getNode()));
|
||||||
processLexicalBlock(DILexicalBlock(S.getNode()));
|
else if (S.isLexicalBlock())
|
||||||
|
processLexicalBlock(DILexicalBlock(S.getNode()));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user