diff options
author | Adrian Prantl <aprantl@apple.com> | 2014-01-07 22:05:55 +0000 |
---|---|---|
committer | Adrian Prantl <aprantl@apple.com> | 2014-01-07 22:05:55 +0000 |
commit | 56741e29d42259599af4a54dfd7df672f77d3058 (patch) | |
tree | 908afaf35419e2c2c44a956874aa662735f5a706 /clang/lib/CodeGen/CGObjC.cpp | |
parent | e83b130defce6ff6ee69c300c14eec52cabadc88 (diff) | |
download | bcm5719-llvm-56741e29d42259599af4a54dfd7df672f77d3058.tar.gz bcm5719-llvm-56741e29d42259599af4a54dfd7df672f77d3058.zip |
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.
llvm-svn: 198715
Diffstat (limited to 'clang/lib/CodeGen/CGObjC.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGObjC.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGObjC.cpp b/clang/lib/CodeGen/CGObjC.cpp index 058ce5686a3..aa990143ac2 100644 --- a/clang/lib/CodeGen/CGObjC.cpp +++ b/clang/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()); } |