From 3a762bf9df6d302a89e162ab3799b72598baa8d6 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Fri, 8 Dec 2017 21:27:00 +0000 Subject: [WebAssembly] Reapply r319186: "Support bitcasted function addresses with varargs." This puts the functionality under control of a command-line option which is off by default to avoid breaking existing setups. llvm-svn: 320197 --- llvm/lib/Target/WebAssembly/WebAssemblyFixFunctionBitcasts.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'llvm/lib/Target/WebAssembly/WebAssemblyFixFunctionBitcasts.cpp') diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyFixFunctionBitcasts.cpp b/llvm/lib/Target/WebAssembly/WebAssemblyFixFunctionBitcasts.cpp index 084576b..666337a 100644 --- a/llvm/lib/Target/WebAssembly/WebAssemblyFixFunctionBitcasts.cpp +++ b/llvm/lib/Target/WebAssembly/WebAssemblyFixFunctionBitcasts.cpp @@ -199,7 +199,7 @@ bool FixFunctionBitcasts::runOnModule(Module &M) { // Bitcasted vararg functions occur in Emscripten's implementation of // EM_ASM, so suppress wrappers for them for now. - if (Ty->isVarArg() || F->isVarArg()) + if (TemporaryWorkarounds && (Ty->isVarArg() || F->isVarArg())) continue; auto Pair = Wrappers.insert(std::make_pair(std::make_pair(F, Ty), nullptr)); -- cgit v1.1