aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGDebugInfo.cpp
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2008-10-18 18:22:23 +0000
committerDaniel Dunbar <daniel@zuster.org>2008-10-18 18:22:23 +0000
commit2284ac9ec80299fcdefae9a2787cf85105a0f203 (patch)
treee09bffb2f9fa50ae8f23ebe54fa49911923cc3f6 /lib/CodeGen/CGDebugInfo.cpp
parenta85e7154e4424b97ce6e5d1c2704690d16bfd07e (diff)
Debug info bug fix, function start wasn't getting generated correctly
for Obj-C methods. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57769 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGDebugInfo.cpp')
-rw-r--r--lib/CodeGen/CGDebugInfo.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/CodeGen/CGDebugInfo.cpp b/lib/CodeGen/CGDebugInfo.cpp
index f326be2769..e1889603ee 100644
--- a/lib/CodeGen/CGDebugInfo.cpp
+++ b/lib/CodeGen/CGDebugInfo.cpp
@@ -598,7 +598,8 @@ CGDebugInfo::getOrCreateType(QualType type, llvm::CompileUnitDesc *Unit)
/// EmitFunctionStart - Constructs the debug code for entering a function -
/// "llvm.dbg.func.start.".
-void CGDebugInfo::EmitFunctionStart(const FunctionDecl *FnDecl,
+void CGDebugInfo::EmitFunctionStart(const char *Name,
+ QualType ReturnType,
llvm::Function *Fn,
llvm::IRBuilder<> &Builder)
{
@@ -611,8 +612,8 @@ void CGDebugInfo::EmitFunctionStart(const FunctionDecl *FnDecl,
}
// Get name information.
- Subprogram->setName(FnDecl->getName());
- Subprogram->setFullName(FnDecl->getName());
+ Subprogram->setName(Name);
+ Subprogram->setFullName(Name);
// Gather location information.
llvm::CompileUnitDesc *Unit = getOrCreateCompileUnit(CurLoc);
@@ -620,8 +621,7 @@ void CGDebugInfo::EmitFunctionStart(const FunctionDecl *FnDecl,
uint64_t Loc = SM.getLogicalLineNumber(CurLoc);
// Get Function Type.
- QualType type = FnDecl->getResultType();
- llvm::TypeDesc *SPTy = getOrCreateType(type, Unit);
+ llvm::TypeDesc *SPTy = getOrCreateType(ReturnType, Unit);
Subprogram->setAnchor(SubprogramAnchor);
Subprogram->setContext(Unit);