[cfe-commits] r71736 - in /cfe/trunk: lib/CodeGen/CGDebugInfo.cpp test/CodeGenObjC/debug-info.m
Daniel Dunbar
daniel at zuster.org
Wed May 13 16:08:59 PDT 2009
Author: ddunbar
Date: Wed May 13 18:08:57 2009
New Revision: 71736
URL: http://llvm.org/viewvc/llvm-project?rev=71736&view=rev
Log:
Make sure not to include the LLVM asm prefix in function names for
debug info.
Added:
cfe/trunk/test/CodeGenObjC/debug-info.m
Modified:
cfe/trunk/lib/CodeGen/CGDebugInfo.cpp
Modified: cfe/trunk/lib/CodeGen/CGDebugInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGDebugInfo.cpp?rev=71736&r1=71735&r2=71736&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGDebugInfo.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGDebugInfo.cpp Wed May 13 18:08:57 2009
@@ -669,6 +669,10 @@
void CGDebugInfo::EmitFunctionStart(const char *Name, QualType ReturnType,
llvm::Function *Fn,
CGBuilderTy &Builder) {
+ // Skip the asm prefix if it exists.
+ if (Name[0] == '\01')
+ ++Name;
+
// FIXME: Why is this using CurLoc???
llvm::DICompileUnit Unit = getOrCreateCompileUnit(CurLoc);
SourceManager &SM = M->getContext().getSourceManager();
Added: cfe/trunk/test/CodeGenObjC/debug-info.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/debug-info.m?rev=71736&view=auto
==============================================================================
--- cfe/trunk/test/CodeGenObjC/debug-info.m (added)
+++ cfe/trunk/test/CodeGenObjC/debug-info.m Wed May 13 18:08:57 2009
@@ -0,0 +1,7 @@
+// 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
+
+ at interface A @end
+ at implementation A
+-(void) m0 {}
+ at end
More information about the cfe-commits
mailing list