summaryrefslogtreecommitdiffstats
path: root/clang/lib/Basic/Targets/WebAssembly.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Basic/Targets/WebAssembly.cpp')
-rw-r--r--clang/lib/Basic/Targets/WebAssembly.cpp9
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";
OpenPOWER on IntegriCloud