aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGObjC.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/CGObjC.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/CGObjC.cpp')
-rw-r--r--lib/CodeGen/CGObjC.cpp10
1 files changed, 2 insertions, 8 deletions
diff --git a/lib/CodeGen/CGObjC.cpp b/lib/CodeGen/CGObjC.cpp
index 0c45c55554..c0260ad06b 100644
--- a/lib/CodeGen/CGObjC.cpp
+++ b/lib/CodeGen/CGObjC.cpp
@@ -119,7 +119,7 @@ void CodeGenFunction::StartObjCMethod(const ObjCMethodDecl *OMD) {
Args.push_back(std::make_pair(IPD, IPD->getType()));
}
- StartFunction(OMD, OMD->getResultType(), Fn, Args);
+ StartFunction(OMD, OMD->getResultType(), Fn, Args, OMD->getLocEnd());
}
/// Generate an Objective-C method. An Objective-C method is a C function with
@@ -127,13 +127,7 @@ void CodeGenFunction::StartObjCMethod(const ObjCMethodDecl *OMD) {
void CodeGenFunction::GenerateObjCMethod(const ObjCMethodDecl *OMD) {
StartObjCMethod(OMD);
EmitStmt(OMD->getBody());
-
- const CompoundStmt *S = dyn_cast<CompoundStmt>(OMD->getBody());
- if (S) {
- FinishFunction(S->getRBracLoc());
- } else {
- FinishFunction();
- }
+ FinishFunction(cast<CompoundStmt>(OMD->getBody())->getRBracLoc());
}
// FIXME: I wasn't sure about the synthesis approach. If we end up