[llvm-commits] [llvm-gcc-4.2] r65465 - /llvm-gcc-4.2/trunk/gcc/llvm-debug.cpp
Devang Patel
dpatel at apple.com
Wed Feb 25 11:22:31 PST 2009
Author: dpatel
Date: Wed Feb 25 13:22:30 2009
New Revision: 65465
URL: http://llvm.org/viewvc/llvm-project?rev=65465&view=rev
Log:
Use original name if is available.
Thanks Dale!
Modified:
llvm-gcc-4.2/trunk/gcc/llvm-debug.cpp
Modified: llvm-gcc-4.2/trunk/gcc/llvm-debug.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/llvm-debug.cpp?rev=65465&r1=65464&r2=65465&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/llvm-debug.cpp (original)
+++ llvm-gcc-4.2/trunk/gcc/llvm-debug.cpp Wed Feb 25 13:22:30 2009
@@ -343,7 +343,12 @@
expanded_location Loc = expand_location(DECL_SOURCE_LOCATION(decl));
DIType TyD = getOrCreateType(TREE_TYPE(decl));
DebugFactory.CreateGlobalVariable(getOrCreateCompileUnit(Loc.file),
- GV->getNameStr(), GV->getNameStr(),
+ GV->getNameStr(),
+ DECL_NAME(decl) ?
+ (IDENTIFIER_POINTER(DECL_NAME(decl)) ?
+ IDENTIFIER_POINTER(DECL_NAME(decl)) :
+ GV->getNameStr()) :
+ GV->getNameStr(),
getLinkageName(decl),
getOrCreateCompileUnit(Loc.file), Loc.line,
TyD, GV->hasInternalLinkage(),
More information about the llvm-commits
mailing list