[llvm-commits] [llvm-gcc-4.2] r63205 - /llvm-gcc-4.2/branches/release_25/gcc/llvm-debug.cpp

Tanya Lattner tonic at nondot.org
Wed Jan 28 07:40:46 PST 2009


Author: tbrethou
Date: Wed Jan 28 09:40:46 2009
New Revision: 63205

URL: http://llvm.org/viewvc/llvm-project?rev=63205&view=rev
Log:
Merge from mainline.
Set function linkage name appropriately.
This allows debugger to find fn/methods.

Modified:
    llvm-gcc-4.2/branches/release_25/gcc/llvm-debug.cpp

Modified: llvm-gcc-4.2/branches/release_25/gcc/llvm-debug.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/branches/release_25/gcc/llvm-debug.cpp?rev=63205&r1=63204&r2=63205&view=diff

==============================================================================
--- llvm-gcc-4.2/branches/release_25/gcc/llvm-debug.cpp (original)
+++ llvm-gcc-4.2/branches/release_25/gcc/llvm-debug.cpp Wed Jan 28 09:40:46 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