aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGDebugInfo.cpp
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-05-14 01:45:24 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-05-14 01:45:24 +0000
commitbbd53af03e4c0d055a312521d97126cd86583c30 (patch)
treeeafe65a58eacc29a7f0982a3a1445818ae1bc57e /lib/CodeGen/CGDebugInfo.cpp
parentd7ba27dc562e1837703fa8696531c1f21a5fdb36 (diff)
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71761 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGDebugInfo.cpp')
-rw-r--r--lib/CodeGen/CGDebugInfo.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/CodeGen/CGDebugInfo.cpp b/lib/CodeGen/CGDebugInfo.cpp
index 9b9fb18819..b35ca7bc31 100644
--- a/lib/CodeGen/CGDebugInfo.cpp
+++ b/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*/);