diff options
author | Sebastian Redl <sebastian.redl@getdesigned.at> | 2009-04-26 20:35:05 +0000 |
---|---|---|
committer | Sebastian Redl <sebastian.redl@getdesigned.at> | 2009-04-26 20:35:05 +0000 |
commit | a7b98a772cb63cd2eb5f1af194c2d5910adeea2a (patch) | |
tree | 6eedb2b10ca06fe8e509d699d9e39825660a7158 /clang/lib/CodeGen/CodeGenFunction.cpp | |
parent | 5bf1a6e98636a113adf6b8078b3e4d6f1181b406 (diff) | |
download | bcm5719-llvm-a7b98a772cb63cd2eb5f1af194c2d5910adeea2a.tar.gz bcm5719-llvm-a7b98a772cb63cd2eb5f1af194c2d5910adeea2a.zip |
Implement function-try-blocks. However, there's a very subtle bug that I can't track down.
llvm-svn: 70155
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.cpp')
-rw-r--r-- | clang/lib/CodeGen/CodeGenFunction.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/clang/lib/CodeGen/CodeGenFunction.cpp b/clang/lib/CodeGen/CodeGenFunction.cpp index c05ead5233b..c74f8344cc8 100644 --- a/clang/lib/CodeGen/CodeGenFunction.cpp +++ b/clang/lib/CodeGen/CodeGenFunction.cpp @@ -225,12 +225,13 @@ void CodeGenFunction::GenerateCode(const FunctionDecl *FD, FProto->getArgType(i))); } - const CompoundStmt *S = FD->getBody(getContext()); + // FIXME: Support CXXTryStmt here, too. + if (const CompoundStmt *S = FD->getCompoundBody(getContext())) { + StartFunction(FD, FD->getResultType(), Fn, Args, S->getLBracLoc()); + EmitStmt(S); + FinishFunction(S->getRBracLoc()); + } - StartFunction(FD, FD->getResultType(), Fn, Args, S->getLBracLoc()); - EmitStmt(S); - FinishFunction(S->getRBracLoc()); - // Destroy the 'this' declaration. if (CXXThisDecl) CXXThisDecl->Destroy(getContext()); |