summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortstellar <tstellar@91177308-0d34-0410-b5e6-96231b3b80d8>2012-09-24 15:51:41 +0000
committertstellar <tstellar@91177308-0d34-0410-b5e6-96231b3b80d8>2012-09-24 15:51:41 +0000
commit809cb37b8771601830ba6d9f8db24b8284310f81 (patch)
tree872f970cbceeb26442bbf2d1287d16d4953cf490
parent685112d5fe43b9ad044a05bacdaf3378979b061b (diff)
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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/R600/@164502 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/CodeGen/AsmPrinter/DwarfDebug.cpp4
-rw-r--r--lib/CodeGen/AsmPrinter/DwarfDebug.h6
2 files changed, 5 insertions, 5 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
index 52fae53fe8..52b10d7ca6 100644
--- a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+++ b/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/lib/CodeGen/AsmPrinter/DwarfDebug.h b/lib/CodeGen/AsmPrinter/DwarfDebug.h
index d5ae4687df..20e232dfc8 100644
--- a/lib/CodeGen/AsmPrinter/DwarfDebug.h
+++ b/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;
}