[cfe-commits] r84653 - in /cfe/trunk: lib/CodeGen/CGDebugInfo.cpp test/CodeGen/2009-10-20-GlobalDebug.c

Devang Patel dpatel at apple.com
Tue Oct 20 11:26:35 PDT 2009


Author: dpatel
Date: Tue Oct 20 13:26:30 2009
New Revision: 84653

URL: http://llvm.org/viewvc/llvm-project?rev=84653&view=rev
Log:
Encode global variable name in debug info.

Added:
    cfe/trunk/test/CodeGen/2009-10-20-GlobalDebug.c
Modified:
    cfe/trunk/lib/CodeGen/CGDebugInfo.cpp

Modified: cfe/trunk/lib/CodeGen/CGDebugInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGDebugInfo.cpp?rev=84653&r1=84652&r2=84653&view=diff

==============================================================================
--- cfe/trunk/lib/CodeGen/CGDebugInfo.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGDebugInfo.cpp Tue Oct 20 13:26:30 2009
@@ -1364,7 +1364,7 @@
   }
 
   DebugFactory.CreateGlobalVariable(getContext(Decl, Unit), 
-                                    Name, Name, "", Unit, LineNo,
+                                    Name, Name, Name, Unit, LineNo,
                                     getOrCreateType(T, Unit),
                                     Var->hasInternalLinkage(),
                                     true/*definition*/, Var);
@@ -1394,7 +1394,7 @@
                                            ArrayType::Normal, 0);
   }
 
-  DebugFactory.CreateGlobalVariable(Unit, Name, Name, "", Unit, LineNo,
+  DebugFactory.CreateGlobalVariable(Unit, Name, Name, Name, Unit, LineNo,
                                     getOrCreateType(T, Unit),
                                     Var->hasInternalLinkage(),
                                     true/*definition*/, Var);

Added: cfe/trunk/test/CodeGen/2009-10-20-GlobalDebug.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/2009-10-20-GlobalDebug.c?rev=84653&view=auto

==============================================================================
--- cfe/trunk/test/CodeGen/2009-10-20-GlobalDebug.c (added)
+++ cfe/trunk/test/CodeGen/2009-10-20-GlobalDebug.c Tue Oct 20 13:26:30 2009
@@ -0,0 +1,4 @@
+// RUN: clang -S -g -dA %s -o - | FileCheck %s
+int global;
+// CHECK: asciz  "global"                                    ## DW_AT_MIPS_linkage_name
+int main() { return 0;}





More information about the cfe-commits mailing list