[llvm-branch-commits] [cfe-branch] r71762 - in /cfe/branches/Apple/Dib: lib/CodeGen/CGDebugInfo.cpp test/CodeGenObjC/debug-info.m
Mike Stump
mrs at apple.com
Wed May 13 18:51:00 PDT 2009
Author: mrs
Date: Wed May 13 20:50:38 2009
New Revision: 71762
URL: http://llvm.org/viewvc/llvm-project?rev=71762&view=rev
Log:
Merge in 71761:
We need to specify the "linkage name" to the subprogram now that we
emit the correct "display name". I suspect we need more work here, see
FIXME for example.
Modified:
cfe/branches/Apple/Dib/lib/CodeGen/CGDebugInfo.cpp
cfe/branches/Apple/Dib/test/CodeGenObjC/debug-info.m
Modified: cfe/branches/Apple/Dib/lib/CodeGen/CGDebugInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/Apple/Dib/lib/CodeGen/CGDebugInfo.cpp?rev=71762&r1=71761&r2=71762&view=diff
==============================================================================
--- cfe/branches/Apple/Dib/lib/CodeGen/CGDebugInfo.cpp (original)
+++ cfe/branches/Apple/Dib/lib/CodeGen/CGDebugInfo.cpp Wed May 13 20:50:38 2009
@@ -669,7 +669,11 @@
void CGDebugInfo::EmitFunctionStart(const char *Name, QualType ReturnType,
llvm::Function *Fn,
CGBuilderTy &Builder) {
+ const char *LinkageName = Name;
+
// Skip the asm prefix if it exists.
+ //
+ // FIXME: This should probably be the unmangled name?
if (Name[0] == '\01')
++Name;
@@ -679,7 +683,7 @@
unsigned LineNo = SM.getPresumedLoc(CurLoc).getLine();
llvm::DISubprogram SP =
- DebugFactory.CreateSubprogram(Unit, Name, Name, "", Unit, LineNo,
+ DebugFactory.CreateSubprogram(Unit, Name, Name, LinkageName, Unit, LineNo,
getOrCreateType(ReturnType, Unit),
Fn->hasInternalLinkage(), true/*definition*/);
Modified: cfe/branches/Apple/Dib/test/CodeGenObjC/debug-info.m
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/Apple/Dib/test/CodeGenObjC/debug-info.m?rev=71762&r1=71761&r2=71762&view=diff
==============================================================================
--- cfe/branches/Apple/Dib/test/CodeGenObjC/debug-info.m (original)
+++ cfe/branches/Apple/Dib/test/CodeGenObjC/debug-info.m Wed May 13 20:50:38 2009
@@ -1,5 +1,8 @@
// RUN: clang-cc -triple i386-apple-darwin9 -g -emit-llvm -o %t %s &&
-// RUN: grep -F 'internal constant [8 x i8] c"-[A m0]\00"' %t
+// RUN: grep '@.str3 = internal constant \[8 x i8\] c"-\[A m0\]\\00"' %t &&
+// RUN: grep '@.str4 = internal constant \[9 x i8\] c"\\01-\[A m0\]\\00"' %t &&
+// RUN: grep '@llvm.dbg.subprogram = .* @.str3, .* @.str3, .* @.str4,' %t &&
+// RUN: true
@interface A @end
@implementation A
More information about the llvm-branch-commits
mailing list