diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-05-14 01:45:24 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-05-14 01:45:24 +0000 |
commit | 7911002bf9c656cb9ae2a1a61f55a7dd7bc36380 (patch) | |
tree | ed5d50183a08325ac2825d7ed863c1173fe4ef72 /clang/lib/CodeGen/CGDebugInfo.cpp | |
parent | f2a2e338ffecff485893425b819e96c65aced043 (diff) | |
download | bcm5719-llvm-7911002bf9c656cb9ae2a1a61f55a7dd7bc36380.tar.gz bcm5719-llvm-7911002bf9c656cb9ae2a1a61f55a7dd7bc36380.zip |
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.
llvm-svn: 71761
Diffstat (limited to 'clang/lib/CodeGen/CGDebugInfo.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGDebugInfo.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp index 9b9fb188193..b35ca7bc316 100644 --- a/clang/lib/CodeGen/CGDebugInfo.cpp +++ b/clang/lib/CodeGen/CGDebugInfo.cpp @@ -669,7 +669,11 @@ llvm::DIType CGDebugInfo::getOrCreateType(QualType Ty, 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 @@ void CGDebugInfo::EmitFunctionStart(const char *Name, QualType ReturnType, 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*/); |