Skip to content

Commit a89b0d8

Browse files
committed
rename variables
SaveSetjmpF -> WasmSetjmpF TestSetjmpF -> WasmSetjmpTestF
1 parent e6b37dc commit a89b0d8

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

llvm/lib/Target/WebAssembly/WebAssemblyLowerEmscriptenEHSjLj.cpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -298,8 +298,8 @@ class WebAssemblyLowerEmscriptenEHSjLj final : public ModulePass {
298298
Function *ResumeF = nullptr; // __resumeException() (Emscripten)
299299
Function *EHTypeIDF = nullptr; // llvm.eh.typeid.for() (intrinsic)
300300
Function *EmLongjmpF = nullptr; // emscripten_longjmp() (Emscripten)
301-
Function *SaveSetjmpF = nullptr; // __wasm_setjmp() (Emscripten)
302-
Function *TestSetjmpF = nullptr; // __wasm_setjmp_test() (Emscripten)
301+
Function *WasmSetjmpF = nullptr; // __wasm_setjmp() (Emscripten)
302+
Function *WasmSetjmpTestF = nullptr; // __wasm_setjmp_test() (Emscripten)
303303
Function *WasmLongjmpF = nullptr; // __wasm_longjmp() (Emscripten)
304304
Function *CatchF = nullptr; // wasm.catch() (intrinsic)
305305

@@ -737,8 +737,8 @@ void WebAssemblyLowerEmscriptenEHSjLj::wrapTestSetjmp(
737737
BasicBlock *EndBB2 = BasicBlock::Create(C, "if.end2", F);
738738
Value *ThrewPtr =
739739
IRB.CreateIntToPtr(Threw, getAddrPtrType(M), Threw->getName() + ".p");
740-
Value *ThenLabel =
741-
IRB.CreateCall(TestSetjmpF, {ThrewPtr, FunctionInvocationId}, "label");
740+
Value *ThenLabel = IRB.CreateCall(WasmSetjmpTestF,
741+
{ThrewPtr, FunctionInvocationId}, "label");
742742
Value *Cmp2 = IRB.CreateICmpEQ(ThenLabel, IRB.getInt32(0));
743743
IRB.CreateCondBr(Cmp2, CallEmLongjmpBB, EndBB2);
744744

@@ -999,11 +999,11 @@ bool WebAssemblyLowerEmscriptenEHSjLj::runOnModule(Module &M) {
999999
FunctionType *FTy = FunctionType::get(
10001000
IRB.getVoidTy(), {SetjmpFTy->getParamType(0), Int32Ty, Int32PtrTy},
10011001
false);
1002-
SaveSetjmpF = getEmscriptenFunction(FTy, "__wasm_setjmp", &M);
1002+
WasmSetjmpF = getEmscriptenFunction(FTy, "__wasm_setjmp", &M);
10031003

10041004
// Register __wasm_setjmp_test function
10051005
FTy = FunctionType::get(Int32Ty, {Int32PtrTy, Int32PtrTy}, false);
1006-
TestSetjmpF = getEmscriptenFunction(FTy, "__wasm_setjmp_test", &M);
1006+
WasmSetjmpTestF = getEmscriptenFunction(FTy, "__wasm_setjmp_test", &M);
10071007

10081008
// wasm.catch() will be lowered down to wasm 'catch' instruction in
10091009
// instruction selection.
@@ -1049,7 +1049,7 @@ bool WebAssemblyLowerEmscriptenEHSjLj::runOnModule(Module &M) {
10491049
if (V && V->use_empty())
10501050
V->eraseFromParent();
10511051
for (auto *V : {GetTempRet0F, SetTempRet0F, ResumeF, EHTypeIDF, EmLongjmpF,
1052-
SaveSetjmpF, TestSetjmpF, WasmLongjmpF, CatchF})
1052+
WasmSetjmpF, WasmSetjmpTestF, WasmLongjmpF, CatchF})
10531053
if (V && V->use_empty())
10541054
V->eraseFromParent();
10551055

@@ -1316,7 +1316,7 @@ bool WebAssemblyLowerEmscriptenEHSjLj::runSjLjOnFunction(Function &F) {
13161316
IRB.SetInsertPoint(CI);
13171317
Value *Args[] = {CI->getArgOperand(0), IRB.getInt32(SetjmpRetPHIs.size()),
13181318
FunctionInvocationId};
1319-
IRB.CreateCall(SaveSetjmpF, Args);
1319+
IRB.CreateCall(WasmSetjmpF, Args);
13201320
ToErase.push_back(CI);
13211321
}
13221322

@@ -1619,7 +1619,7 @@ void WebAssemblyLowerEmscriptenEHSjLj::handleLongjmpableCallsForWasmSjLj(
16191619
BasicBlock *ThenBB = BasicBlock::Create(C, "if.then", &F);
16201620
BasicBlock *EndBB = BasicBlock::Create(C, "if.end", &F);
16211621
Value *EnvP = IRB.CreateBitCast(Env, getAddrPtrType(&M), "env.p");
1622-
Value *Label = IRB.CreateCall(TestSetjmpF, {EnvP, FunctionInvocationId},
1622+
Value *Label = IRB.CreateCall(WasmSetjmpTestF, {EnvP, FunctionInvocationId},
16231623
OperandBundleDef("funclet", CatchPad), "label");
16241624
Value *Cmp = IRB.CreateICmpEQ(Label, IRB.getInt32(0));
16251625
IRB.CreateCondBr(Cmp, ThenBB, EndBB);

0 commit comments

Comments
 (0)