diff options
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/IR/DebugInfo.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/llvm/lib/IR/DebugInfo.cpp b/llvm/lib/IR/DebugInfo.cpp index 0fbfd2da86c..b611f458c0e 100644 --- a/llvm/lib/IR/DebugInfo.cpp +++ b/llvm/lib/IR/DebugInfo.cpp @@ -908,6 +908,14 @@ void DebugInfoFinder::processScope(DIScope Scope) { processType(Ty); return; } + if (Scope.isCompileUnit()) { + addCompileUnit(DICompileUnit(Scope)); + return; + } + if (Scope.isSubprogram()) { + processSubprogram(DISubprogram(Scope)); + return; + } if (!addScope(Scope)) return; if (Scope.isLexicalBlock()) { @@ -954,6 +962,7 @@ void DebugInfoFinder::processDeclare(const DbgDeclareInst *DDI) { if (!NodesSeen.insert(DV)) return; + processScope(DIVariable(N).getContext()); processType(DIVariable(N).getType()); } |

