[llvm-branch-commits] [llvm-branch] r164502 - in /llvm/branches/R600/lib/CodeGen/AsmPrinter: DwarfDebug.cpp DwarfDebug.h

Tom Stellard thomas.stellard at amd.com
Mon Sep 24 08:53:19 PDT 2012


Author: tstellar
Date: Mon Sep 24 10:51:41 2012
New Revision: 164502

URL: http://llvm.org/viewvc/llvm-project?rev=164502&view=rev
Log:
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

Modified:
    llvm/branches/R600/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
    llvm/branches/R600/lib/CodeGen/AsmPrinter/DwarfDebug.h

Modified: llvm/branches/R600/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/R600/lib/CodeGen/AsmPrinter/DwarfDebug.cpp?rev=164502&r1=164501&r2=164502&view=diff
==============================================================================
--- llvm/branches/R600/lib/CodeGen/AsmPrinter/DwarfDebug.cpp (original)
+++ llvm/branches/R600/lib/CodeGen/AsmPrinter/DwarfDebug.cpp Mon Sep 24 10:51:41 2012
@@ -515,8 +515,10 @@
   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]))

Modified: llvm/branches/R600/lib/CodeGen/AsmPrinter/DwarfDebug.h
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/R600/lib/CodeGen/AsmPrinter/DwarfDebug.h?rev=164502&r1=164501&r2=164502&view=diff
==============================================================================
--- llvm/branches/R600/lib/CodeGen/AsmPrinter/DwarfDebug.h (original)
+++ llvm/branches/R600/lib/CodeGen/AsmPrinter/DwarfDebug.h Mon Sep 24 10:51:41 2012
@@ -159,8 +159,7 @@
   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 @@
   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;
   }





More information about the llvm-branch-commits mailing list