[llvm-commits] [llvm-gcc-4.2] r93936 - /llvm-gcc-4.2/trunk/gcc/llvm-debug.cpp
Devang Patel
dpatel at apple.com
Tue Jan 19 14:47:46 PST 2010
Author: dpatel
Date: Tue Jan 19 16:47:45 2010
New Revision: 93936
URL: http://llvm.org/viewvc/llvm-project?rev=93936&view=rev
Log:
Do not rely on lang_hooks.dwarf_name() to get a symbol's name for DWARF output. The storage used for the name can be reused unexpectedly. Instead just get the name from tree node.
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=93936&r1=93935&r2=93936&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/llvm-debug.cpp (original)
+++ llvm-gcc-4.2/trunk/gcc/llvm-debug.cpp Tue Jan 19 16:47:45 2010
@@ -313,7 +313,7 @@
&& DECL_ABSTRACT_ORIGIN (FnDecl) != FnDecl)
ArtificialFnWithAbstractOrigin = true;
- const char *FnName = lang_hooks.dwarf_name(FnDecl, 0);
+ StringRef FnName = GetNodeName(FnDecl);
DISubprogram SP =
DebugFactory.CreateSubprogram(ArtificialFnWithAbstractOrigin ?
getOrCreateCompileUnit(main_input_filename) :
@@ -922,7 +922,7 @@
else {
// Get the location of the member.
expanded_location MemLoc = GetNodeLocation(Member, false);
- const char *MemberName = lang_hooks.dwarf_name(Member, 0);
+ StringRef MemberName = GetNodeName(Member);
StringRef LinkageName = getLinkageName(Member);
DIType SPTy = getOrCreateType(TREE_TYPE(Member));
unsigned Virtuality = 0;
More information about the llvm-commits
mailing list