summaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGObjC.cpp
diff options
context:
space:
mode:
authorAdrian Prantl <aprantl@apple.com>2014-01-07 22:05:55 +0000
committerAdrian Prantl <aprantl@apple.com>2014-01-07 22:05:55 +0000
commiteebee8fb75a07e4aa00b0fc2b28d0ee6480b4099 (patch)
tree756526aeebc42dad520b5fecf3c2e116a155a248 /lib/CodeGen/CGObjC.cpp
parentda45f59bdf398efea71e0b6596ebf2b65d8549dc (diff)
downloadclang-eebee8fb75a07e4aa00b0fc2b28d0ee6480b4099.tar.gz
clang-eebee8fb75a07e4aa00b0fc2b28d0ee6480b4099.tar.bz2
clang-eebee8fb75a07e4aa00b0fc2b28d0ee6480b4099.tar.xz
Re-applying r198699 after reverting r198461.
Debug info: Implement a cleaner version of r198461. For symmetry with C and C++ don't emit an extra lexical scope for the compound statement that is the body of an Objective-C method. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@198715 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGObjC.cpp')
-rw-r--r--lib/CodeGen/CGObjC.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/CodeGen/CGObjC.cpp b/lib/CodeGen/CGObjC.cpp
index 058ce5686a..aa990143ac 100644
--- a/lib/CodeGen/CGObjC.cpp
+++ b/lib/CodeGen/CGObjC.cpp
@@ -506,7 +506,8 @@ static llvm::Value *emitARCRetainLoadOfScalar(CodeGenFunction &CGF,
/// its pointer, name, and types registered in the class struture.
void CodeGenFunction::GenerateObjCMethod(const ObjCMethodDecl *OMD) {
StartObjCMethod(OMD, OMD->getClassInterface(), OMD->getLocStart());
- EmitStmt(OMD->getBody());
+ assert(isa<CompoundStmt>(OMD->getBody()));
+ EmitCompoundStmtWithoutScope(*cast<CompoundStmt>(OMD->getBody()));
FinishFunction(OMD->getBodyRBrace());
}