[llvm-commits] [llvm-gcc-4.2] r69683 - /llvm-gcc-4.2/trunk/gcc/llvm-debug.cpp
Devang Patel
dpatel at apple.com
Tue Apr 21 10:20:37 PDT 2009
Author: dpatel
Date: Tue Apr 21 12:20:37 2009
New Revision: 69683
URL: http://llvm.org/viewvc/llvm-project?rev=69683&view=rev
Log:
If llvm value is set then use value name as linkage name while emitting debug info.
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=69683&r1=69682&r2=69683&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/llvm-debug.cpp (original)
+++ llvm-gcc-4.2/trunk/gcc/llvm-debug.cpp Tue Apr 21 12:20:37 2009
@@ -182,6 +182,12 @@
static const char *getLinkageName(tree Node) {
+ // Use llvm value name as linkage name if it is available.
+ if (DECL_LLVM_SET_P(Node)) {
+ Value *V = DECL_LLVM(Node);
+ return V->getNameStart();
+ }
+
tree decl_name = DECL_NAME(Node);
if (decl_name != NULL && IDENTIFIER_POINTER (decl_name) != NULL) {
if (TREE_PUBLIC(Node) &&
More information about the llvm-commits
mailing list