[clang] [WebAssembly] Define __USING_WASM_EXCEPTIONS__ for -fwasm-exceptions (PR #92604)
Sam Clegg via cfe-commits
cfe-commits at lists.llvm.org
Fri May 17 16:02:54 PDT 2024
================
@@ -1006,6 +1006,8 @@ static void InitializePredefinedMacros(const TargetInfo &TI,
else if (LangOpts.hasDWARFExceptions() &&
(TI.getTriple().isThumb() || TI.getTriple().isARM()))
Builder.defineMacro("__ARM_DWARF_EH__");
+ else if (LangOpts.hasWasmExceptions() && TI.getTriple().isWasm())
+ Builder.defineMacro("__USING_WASM_EXCEPTIONS__");
----------------
sbc100 wrote:
I don't think we should remove the define here, I just want us to consider carefully the name of the define if we are going to have the compiler generate it.
The removal I was referring to was the `-D...` flags used in emscripten and wasi-sdk, which will be redundant once this change land (and they convert to using the new macro).
https://github.com/llvm/llvm-project/pull/92604
More information about the cfe-commits
mailing list