[llvm-commits] [llvm-gcc-4.2] r65477 - /llvm-gcc-4.2/branches/Apple/Dib/gcc/llvm-debug.cpp

Bill Wendling isanbard at gmail.com
Wed Feb 25 14:16:37 PST 2009


Author: void
Date: Wed Feb 25 16:16:37 2009
New Revision: 65477

URL: http://llvm.org/viewvc/llvm-project?rev=65477&view=rev
Log:
--- Merging (from foreign repository) r65475 into '.':
U    gcc/llvm-debug.cpp

Use original name if is available.
Thanks Dale!

Modified:
    llvm-gcc-4.2/branches/Apple/Dib/gcc/llvm-debug.cpp

Modified: llvm-gcc-4.2/branches/Apple/Dib/gcc/llvm-debug.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/branches/Apple/Dib/gcc/llvm-debug.cpp?rev=65477&r1=65476&r2=65477&view=diff

==============================================================================
--- llvm-gcc-4.2/branches/Apple/Dib/gcc/llvm-debug.cpp (original)
+++ llvm-gcc-4.2/branches/Apple/Dib/gcc/llvm-debug.cpp Wed Feb 25 16:16:37 2009
@@ -340,8 +340,15 @@
   // Gather location information.
   expanded_location Loc = expand_location(DECL_SOURCE_LOCATION(decl));
   DIType TyD = getOrCreateType(TREE_TYPE(decl));
+  std::string DispName = GV->getNameStr();
+  if (DECL_NAME(decl)) {
+    if (IDENTIFIER_POINTER(DECL_NAME(decl)))
+      DispName = IDENTIFIER_POINTER(DECL_NAME(decl));
+  }
+    
   DebugFactory.CreateGlobalVariable(getOrCreateCompileUnit(Loc.file), 
-                                    GV->getNameStr(), GV->getNameStr(), 
+                                    GV->getNameStr(), 
+                                    DispName,
                                     getLinkageName(decl), 
                                     getOrCreateCompileUnit(Loc.file), Loc.line,
                                     TyD, GV->hasInternalLinkage(),





More information about the llvm-commits mailing list