diff options
author | Eric Christopher <echristo@apple.com> | 2012-09-21 22:18:52 +0000 |
---|---|---|
committer | Eric Christopher <echristo@apple.com> | 2012-09-21 22:18:52 +0000 |
commit | c1c8a1bb6ad9f95f1e9affb9d1f22ff5a1b70b3a (patch) | |
tree | 3dc90fea7c8b2b6d65aaa0102955895c87060d28 /llvm/lib | |
parent | a52a6a8351283a694f23bb90669c93950b83308b (diff) | |
download | bcm5719-llvm-c1c8a1bb6ad9f95f1e9affb9d1f22ff5a1b70b3a.tar.gz bcm5719-llvm-c1c8a1bb6ad9f95f1e9affb9d1f22ff5a1b70b3a.zip |
Have the DbgVariable "isArtificial" and "isObjectPointer" not
care about it being an argument variable so that we can decide
that captured block and lambda vars that don't happen to
be arguments could be an argument pointer.
Add the object pointer for one case onto the subprogram die.
rdar://12001329
llvm-svn: 164419
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 4 | ||||
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index 52fae53fe84..52b10d7ca68 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp @@ -515,8 +515,10 @@ DIE *DwarfDebug::constructScopeDIE(CompileUnit *TheCU, LexicalScope *Scope) { const SmallVector<DbgVariable *, 8> &Variables = ScopeVariables.lookup(Scope); for (unsigned i = 0, N = Variables.size(); i < N; ++i) if (DIE *Variable = - TheCU->constructVariableDIE(Variables[i], Scope->isAbstractScope())) + TheCU->constructVariableDIE(Variables[i], Scope->isAbstractScope())) { Children.push_back(Variable); + if (Variables[i]->isObjectPointer()) ObjectPointer = Variable; + } const SmallVector<LexicalScope *, 4> &Scopes = Scope->getChildren(); for (unsigned j = 0, M = Scopes.size(); j < M; ++j) if (DIE *Nested = constructScopeDIE(TheCU, Scopes[j])) diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h index d5ae4687df5..20e232dfc85 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h @@ -159,8 +159,7 @@ public: bool isArtificial() const { if (Var.isArtificial()) return true; - if (Var.getTag() == dwarf::DW_TAG_arg_variable - && getType().isArtificial()) + if (getType().isArtificial()) return true; return false; } @@ -168,8 +167,7 @@ public: bool isObjectPointer() const { if (Var.isObjectPointer()) return true; - if (Var.getTag() == dwarf::DW_TAG_arg_variable - && getType().isObjectPointer()) + if (getType().isObjectPointer()) return true; return false; } |