Skip to content

Commit 49ddfbe

Browse files
committed
fix arg
1 parent 2e1163c commit 49ddfbe

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lab6/llvm-pass.so.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ PreservedAnalyses LLVMPass::run(Module &M, ModuleAnalysisManager &MAM) {
1919
IRBuilder<> Builder(&*F.getEntryBlock().getFirstInsertionPt());
2020

2121
// 1. 插入 debug(48763);
22-
Builder.CreateCall(debug_func, debugArg);
22+
Builder.CreateCall(debug_func, debug_arg);
2323

2424
// 2. 將 argv[1] = "hayaku... motohayaku!"
2525
// 建立常數字串
@@ -38,7 +38,7 @@ PreservedAnalyses LLVMPass::run(Module &M, ModuleAnalysisManager &MAM) {
3838
Builder.CreateStore(StrConstant, argv1Ptr);
3939

4040
// 3. 將 argc 改為 48763
41-
argcArg->replaceAllUsesWith(debugArg); // 把 argc 的所有使用都替換成 48763
41+
argcArg->replaceAllUsesWith(debug_arg); // 把 argc 的所有使用都替換成 48763
4242
}
4343

4444
}

0 commit comments

Comments
 (0)