diff options
author | Heejin Ahn <aheejin@gmail.com> | 2018-03-02 00:39:16 +0000 |
---|---|---|
committer | Heejin Ahn <aheejin@gmail.com> | 2018-03-02 00:39:16 +0000 |
commit | 8b6af22e6034b68cf737005de46fbee6ab287ca2 (patch) | |
tree | bd076f2519b2052654859ec115015bc8096c3c22 /clang/lib/Basic/Targets/WebAssembly.cpp | |
parent | 3f547fe8571c2bb6b3fd10bef6af08da1436bd85 (diff) | |
download | bcm5719-llvm-8b6af22e6034b68cf737005de46fbee6ab287ca2.tar.gz bcm5719-llvm-8b6af22e6034b68cf737005de46fbee6ab287ca2.zip |
[WebAssembly] Add exception handling option
Summary: Add exception handling option to clang.
Reviewers: dschuff
Subscribers: jfb, sbc100, jgravelle-google, sunfish, cfe-commits
Differential Revision: https://reviews.llvm.org/D43681
llvm-svn: 326517
Diffstat (limited to 'clang/lib/Basic/Targets/WebAssembly.cpp')
-rw-r--r-- | clang/lib/Basic/Targets/WebAssembly.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/clang/lib/Basic/Targets/WebAssembly.cpp b/clang/lib/Basic/Targets/WebAssembly.cpp index 4338d03ade0..b8a2a092aff 100644 --- a/clang/lib/Basic/Targets/WebAssembly.cpp +++ b/clang/lib/Basic/Targets/WebAssembly.cpp @@ -37,6 +37,7 @@ bool WebAssemblyTargetInfo::hasFeature(StringRef Feature) const { .Case("simd128", SIMDLevel >= SIMD128) .Case("nontrapping-fptoint", HasNontrappingFPToInt) .Case("sign-ext", HasSignExt) + .Case("exception-handling", HasExceptionHandling) .Default(false); } @@ -83,6 +84,14 @@ bool WebAssemblyTargetInfo::handleTargetFeatures( HasSignExt = false; continue; } + if (Feature == "+exception-handling") { + HasExceptionHandling = true; + continue; + } + if (Feature == "-exception-handling") { + HasExceptionHandling = false; + continue; + } Diags.Report(diag::err_opt_not_valid_with_opt) << Feature << "-target-feature"; |