diff options
author | Dan Gohman <dan433584@gmail.com> | 2017-11-30 18:16:49 +0000 |
---|---|---|
committer | Dan Gohman <dan433584@gmail.com> | 2017-11-30 18:16:49 +0000 |
commit | 78c19d60a97fa6c7d3854827ec647f88e48904b4 (patch) | |
tree | 9323837e2a290079b438796be57d0cb7295da432 /llvm/lib | |
parent | b2ee25ac8ae39aaae8ea3b6419ca00109d6cea21 (diff) | |
download | bcm5719-llvm-78c19d60a97fa6c7d3854827ec647f88e48904b4.tar.gz bcm5719-llvm-78c19d60a97fa6c7d3854827ec647f88e48904b4.zip |
[WebAssembly] Revert r319186 "Support bitcasted function addresses with varargs."
The patch broke Emscripten's EM_ASM macros, which utiltize unprototyped
functions.
See https://bugs.llvm.org/show_bug.cgi?id=35385 for details.
llvm-svn: 319452
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/Target/WebAssembly/WebAssemblyFixFunctionBitcasts.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyFixFunctionBitcasts.cpp b/llvm/lib/Target/WebAssembly/WebAssemblyFixFunctionBitcasts.cpp index 6473a2bfb59..f1d2c00d163 100644 --- a/llvm/lib/Target/WebAssembly/WebAssemblyFixFunctionBitcasts.cpp +++ b/llvm/lib/Target/WebAssembly/WebAssemblyFixFunctionBitcasts.cpp @@ -162,6 +162,11 @@ bool FixFunctionBitcasts::runOnModule(Module &M) { if (!Ty) continue; + // Bitcasted vararg functions occur in Emscripten's implementation of + // EM_ASM, so suppress wrappers for them for now. + if (Ty->isVarArg() || F->isVarArg()) + continue; + auto Pair = Wrappers.insert(std::make_pair(std::make_pair(F, Ty), nullptr)); if (Pair.second) Pair.first->second = CreateWrapper(F, Ty); |