[llvm-commits] [llvm-gcc-4.2] r62856 - /llvm-gcc-4.2/trunk/gcc/llvm-debug.cpp
Devang Patel
dpatel at apple.com
Fri Jan 23 10:38:10 PST 2009
Author: dpatel
Date: Fri Jan 23 12:38:10 2009
New Revision: 62856
URL: http://llvm.org/viewvc/llvm-project?rev=62856&view=rev
Log:
Set function linkage name appropriately.
This allows debugger to find fn/methods.
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=62856&r1=62855&r2=62856&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/llvm-debug.cpp (original)
+++ llvm-gcc-4.2/trunk/gcc/llvm-debug.cpp Fri Jan 23 12:38:10 2009
@@ -216,6 +216,7 @@
expanded_location Loc = GetNodeLocation(FnDecl, false);
std::string Filename, Directory;
DirectoryAndFile(Loc.file, Directory, Filename);
+ const char *FnName = GetNodeName(FnDecl);
const char *LinkageName = getLinkageName(FnDecl);
tree func_type = TREE_TYPE(FnDecl);
@@ -240,8 +241,7 @@
llvm::DIType(), FnTypeArray);
DISubprogram SP = DebugFactory.CreateSubprogram(MainCompileUnit,
- Fn->getNameStr(),
- Fn->getNameStr(), LinkageName,
+ FnName, FnName, LinkageName,
MainCompileUnit, CurLineNo,
FnTy,
Fn->hasInternalLinkage(),
@@ -619,10 +619,11 @@
DirectoryAndFile(MemLoc.file, MemDirectory, MemFilename);
const char *MemberName = GetNodeName(Member);
+ const char *LinkageName = getLinkageName(Member);
DIType SPTy = getOrCreateType(TREE_TYPE(Member));
DISubprogram SP =
DebugFactory.CreateSubprogram(MainCompileUnit, MemberName, MemberName,
- MemberName, MainCompileUnit,
+ LinkageName, MainCompileUnit,
MemLoc.line, SPTy, false, false,
&MemFilename, &MemDirectory);
More information about the llvm-commits
mailing list