mirror of
https://github.com/RPCS3/llvm.git
synced 2026-07-21 11:15:29 -04:00
[WebAssembly] Don't create bitcast-wrappers for varargs.
WebAssembly varargs functions use a significantly different ABI than non-varargs functions, and the current code in WebAssemblyFixFunctionBitcasts doesn't handle that difference. For now, just avoid creating wrapper functions in the presence of varargs. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292645 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -148,6 +148,11 @@ bool FixFunctionBitcasts::runOnModule(Module &M) {
|
||||
if (!Ty)
|
||||
continue;
|
||||
|
||||
// Wasm varargs are not ABI-compatible with non-varargs. Just ignore
|
||||
// such casts 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);
|
||||
|
||||
Reference in New Issue
Block a user