Make sure not to include the LLVM asm prefix in function names for

debug info.

llvm-svn: 71736
This commit is contained in:
Daniel Dunbar 2009-05-13 23:08:57 +00:00
parent 91fa781df3
commit 0beb7894c4
2 changed files with 11 additions and 0 deletions

View File

@ -669,6 +669,10 @@ llvm::DIType CGDebugInfo::getOrCreateType(QualType Ty,
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();

View File

@ -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
@interface A @end
@implementation A
-(void) m0 {}
@end