diff options
author | Anders Carlsson <andersca@mac.com> | 2010-02-06 23:59:05 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@mac.com> | 2010-02-06 23:59:05 +0000 |
commit | a994ee4b197554282ae6b222c3284ccaa3a6484c (patch) | |
tree | 4b3233579ed31634d682068fd6d902bd3c49fa4a /lib/CodeGen/CGException.cpp | |
parent | a508b7de6c5246ab04ed69d0ab4e9977ec1fb4d4 (diff) |
Make EmitStartEHSpec and EmitEndEHSpec return early when exceptions are disabled.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95509 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGException.cpp')
-rw-r--r-- | lib/CodeGen/CGException.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/CodeGen/CGException.cpp b/lib/CodeGen/CGException.cpp index a992b459d8..85db6bb973 100644 --- a/lib/CodeGen/CGException.cpp +++ b/lib/CodeGen/CGException.cpp @@ -317,6 +317,9 @@ void CodeGenFunction::EmitCXXThrowExpr(const CXXThrowExpr *E) { } void CodeGenFunction::EmitStartEHSpec(const Decl *D) { + if (!Exceptions) + return; + const FunctionDecl* FD = dyn_cast_or_null<FunctionDecl>(D); if (FD == 0) return; @@ -411,6 +414,9 @@ void CodeGenFunction::EmitStartEHSpec(const Decl *D) { } void CodeGenFunction::EmitEndEHSpec(const Decl *D) { + if (!Exceptions) + return; + const FunctionDecl* FD = dyn_cast_or_null<FunctionDecl>(D); if (FD == 0) return; |