[llvm-commits] [dragonegg] r94899 - /dragonegg/trunk/llvm-debug.cpp
Duncan Sands
baldrick at free.fr
Sat Jan 30 09:12:53 PST 2010
Author: baldrick
Date: Sat Jan 30 11:12:53 2010
New Revision: 94899
URL: http://llvm.org/viewvc/llvm-project?rev=94899&view=rev
Log:
Port commit 93936 (dpatel) from llvm-gcc:
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:
dragonegg/trunk/llvm-debug.cpp
Modified: dragonegg/trunk/llvm-debug.cpp
URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/llvm-debug.cpp?rev=94899&r1=94898&r2=94899&view=diff
==============================================================================
--- dragonegg/trunk/llvm-debug.cpp (original)
+++ dragonegg/trunk/llvm-debug.cpp Sat Jan 30 11:12:53 2010
@@ -267,7 +267,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) :
@@ -834,7 +834,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