diff options
author | Heejin Ahn <aheejin@gmail.com> | 2020-05-15 21:33:44 -0700 |
---|---|---|
committer | Heejin Ahn <aheejin@gmail.com> | 2020-05-15 21:33:44 -0700 |
commit | 945ad141ce63c94b5822d52ad76c49aba906a4b8 (patch) | |
tree | 36484e33736b319ef012e7f5582d1fedd9a93caf /clang/lib/CodeGen/CGException.cpp | |
parent | bca347508c86647f9d44992275c9a364fbd9fb0d (diff) | |
download | llvm-945ad141ce63c94b5822d52ad76c49aba906a4b8.zip llvm-945ad141ce63c94b5822d52ad76c49aba906a4b8.tar.gz llvm-945ad141ce63c94b5822d52ad76c49aba906a4b8.tar.bz2 |
Revert "[WebAssembly] Handle exception specifications"
This reverts commit bca347508c86647f9d44992275c9a364fbd9fb0d.
This broke clang/test/Misc/warning-flags.c, because the newly added
warning option in this commit didn't have a matching flag.
Diffstat (limited to 'clang/lib/CodeGen/CGException.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGException.cpp | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/clang/lib/CodeGen/CGException.cpp b/clang/lib/CodeGen/CGException.cpp index d821eb2..a5dae1b 100644 --- a/clang/lib/CodeGen/CGException.cpp +++ b/clang/lib/CodeGen/CGException.cpp @@ -20,7 +20,6 @@ #include "clang/AST/StmtCXX.h" #include "clang/AST/StmtObjC.h" #include "clang/AST/StmtVisitor.h" -#include "clang/Basic/DiagnosticSema.h" #include "clang/Basic/TargetBuiltins.h" #include "llvm/IR/IntrinsicInst.h" #include "llvm/IR/Intrinsics.h" @@ -469,18 +468,6 @@ void CodeGenFunction::EmitStartEHSpec(const Decl *D) { // encode these in an object file but MSVC doesn't do anything with it. if (getTarget().getCXXABI().isMicrosoft()) return; - // In wasm we currently treat 'throw()' in the same way as 'noexcept'. In - // case of throw with types, we ignore it and print a warning for now. - // TODO Correctly handle exception specification in wasm - if (getTarget().getCXXABI() == TargetCXXABI::WebAssembly) { - if (EST == EST_DynamicNone) - EHStack.pushTerminate(); - else - CGM.getDiags().Report(D->getLocation(), - diag::warn_wasm_dynamic_exception_spec_ignored) - << FD->getExceptionSpecSourceRange(); - return; - } unsigned NumExceptions = Proto->getNumExceptions(); EHFilterScope *Filter = EHStack.pushFilter(NumExceptions); @@ -557,14 +544,6 @@ void CodeGenFunction::EmitEndEHSpec(const Decl *D) { // encode these in an object file but MSVC doesn't do anything with it. if (getTarget().getCXXABI().isMicrosoft()) return; - // In wasm we currently treat 'throw()' in the same way as 'noexcept'. In - // case of throw with types, we ignore it and print a warning for now. - // TODO Correctly handle exception specification in wasm - if (getTarget().getCXXABI() == TargetCXXABI::WebAssembly) { - if (EST == EST_DynamicNone) - EHStack.popTerminate(); - return; - } EHFilterScope &filterScope = cast<EHFilterScope>(*EHStack.begin()); emitFilterDispatchBlock(*this, filterScope); EHStack.popFilter(); |