diff options
Diffstat (limited to 'llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCTargetDesc.cpp')
| -rw-r--r-- | llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCTargetDesc.cpp | 33 |
1 files changed, 3 insertions, 30 deletions
diff --git a/llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCTargetDesc.cpp b/llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCTargetDesc.cpp index a4162a07ee33..8019ae165ec8 100644 --- a/llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCTargetDesc.cpp +++ b/llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCTargetDesc.cpp @@ -20,6 +20,7 @@ #include "llvm/MC/MCRegisterInfo.h" #include "llvm/MC/MCSubtargetInfo.h" #include "llvm/MC/TargetRegistry.h" +#include "llvm/Support/Compiler.h" #include "llvm/Support/ErrorHandling.h" using namespace llvm; @@ -35,35 +36,6 @@ using namespace llvm; #define GET_REGINFO_MC_DESC #include "WebAssemblyGenRegisterInfo.inc" -// Exception handling & setjmp-longjmp handling related options. - -// Emscripten's asm.js-style exception handling -cl::opt<bool> WebAssembly::WasmEnableEmEH( - "enable-emscripten-cxx-exceptions", - cl::desc("WebAssembly Emscripten-style exception handling"), - cl::init(false)); -// Emscripten's asm.js-style setjmp/longjmp handling -cl::opt<bool> WebAssembly::WasmEnableEmSjLj( - "enable-emscripten-sjlj", - cl::desc("WebAssembly Emscripten-style setjmp/longjmp handling"), - cl::init(false)); -// Exception handling using wasm EH instructions -cl::opt<bool> - WebAssembly::WasmEnableEH("wasm-enable-eh", - cl::desc("WebAssembly exception handling")); -// setjmp/longjmp handling using wasm EH instrutions -cl::opt<bool> WebAssembly::WasmEnableSjLj( - "wasm-enable-sjlj", cl::desc("WebAssembly setjmp/longjmp handling")); -// If true, use the legacy Wasm EH proposal: -// https://github.com/WebAssembly/exception-handling/blob/main/proposals/exception-handling/legacy/Exceptions.md -// And if false, use the standardized Wasm EH proposal: -// https://github.com/WebAssembly/exception-handling/blob/main/proposals/exception-handling/Exceptions.md -// Currently set to true by default because not all major web browsers turn on -// the new standard proposal by default, but will later change to false. -cl::opt<bool> WebAssembly::WasmUseLegacyEH( - "wasm-use-legacy-eh", cl::desc("WebAssembly exception handling (legacy)"), - cl::init(true)); - static MCAsmInfo *createMCAsmInfo(const MCRegisterInfo & /*MRI*/, const Triple &TT, const MCTargetOptions &Options) { @@ -124,7 +96,8 @@ static MCTargetStreamer *createNullTargetStreamer(MCStreamer &S) { } // Force static initialization. -extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeWebAssemblyTargetMC() { +extern "C" LLVM_ABI LLVM_EXTERNAL_VISIBILITY void +LLVMInitializeWebAssemblyTargetMC() { for (Target *T : {&getTheWebAssemblyTarget32(), &getTheWebAssemblyTarget64()}) { // Register the MC asm info. |
