diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2023-04-14 21:41:27 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2023-07-23 17:38:08 +0000 |
| commit | 320d4fb58b6b1c6a0c7ffeab3d4672d1479d5e17 (patch) | |
| tree | 4b5e279a6f091bb6bdc639752cf4139dfd7053a4 /contrib/llvm-project/llvm/lib/Target/WebAssembly/WebAssemblyFixFunctionBitcasts.cpp | |
| parent | 814cfa6ad43c73de9b8030f241f516dad3f669ef (diff) | |
Diffstat (limited to 'contrib/llvm-project/llvm/lib/Target/WebAssembly/WebAssemblyFixFunctionBitcasts.cpp')
| -rw-r--r-- | contrib/llvm-project/llvm/lib/Target/WebAssembly/WebAssemblyFixFunctionBitcasts.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/contrib/llvm-project/llvm/lib/Target/WebAssembly/WebAssemblyFixFunctionBitcasts.cpp b/contrib/llvm-project/llvm/lib/Target/WebAssembly/WebAssemblyFixFunctionBitcasts.cpp index 2a4349e02f1b..b3fe110a092b 100644 --- a/contrib/llvm-project/llvm/lib/Target/WebAssembly/WebAssemblyFixFunctionBitcasts.cpp +++ b/contrib/llvm-project/llvm/lib/Target/WebAssembly/WebAssemblyFixFunctionBitcasts.cpp @@ -141,7 +141,7 @@ static Function *createWrapper(Function *F, FunctionType *Ty) { if (CastInst::isBitOrNoopPointerCastable(ArgType, ParamType, DL)) { Instruction *PtrCast = CastInst::CreateBitOrPointerCast(AI, ParamType, "cast"); - BB->getInstList().push_back(PtrCast); + PtrCast->insertInto(BB, BB->end()); Args.push_back(PtrCast); } else if (ArgType->isStructTy() || ParamType->isStructTy()) { LLVM_DEBUG(dbgs() << "createWrapper: struct param type in bitcast: " @@ -181,7 +181,7 @@ static Function *createWrapper(Function *F, FunctionType *Ty) { DL)) { Instruction *Cast = CastInst::CreateBitOrPointerCast(Call, RtnType, "cast"); - BB->getInstList().push_back(Cast); + Cast->insertInto(BB, BB->end()); ReturnInst::Create(M->getContext(), Cast, BB); } else if (RtnType->isStructTy() || ExpectedRtnType->isStructTy()) { LLVM_DEBUG(dbgs() << "createWrapper: struct return type in bitcast: " |
