Skip to content

Commit 46d7876

Browse files
committed
Follow up to 6b62a91, fix llvm-examples build
This is due to the {I,F}CmpInst constructor being normalised to take a pointer to a block rather than a reference (unlike any other Instruction).
1 parent 530f0e6 commit 46d7876

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

llvm/examples/BrainF/BrainF.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,7 @@ void BrainF::readloop(PHINode *phi, BasicBlock *oldbb, BasicBlock *testbb,
440440
LoadInst *tape_0 = new LoadInst(Int8Ty, head_0, tapereg, testbb);
441441

442442
//%test.%d = icmp eq i8 %tape.%d, 0
443-
ICmpInst *test_0 = new ICmpInst(*testbb, ICmpInst::ICMP_EQ, tape_0,
443+
ICmpInst *test_0 = new ICmpInst(testbb, ICmpInst::ICMP_EQ, tape_0,
444444
ConstantInt::get(C, APInt(8, 0)), testreg);
445445

446446
//br i1 %test.%d, label %main.%d, label %main.%d

llvm/examples/Fibonacci/fibonacci.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ static Function *CreateFibFunction(Module *M, LLVMContext &Context) {
7373
BasicBlock* RecurseBB = BasicBlock::Create(Context, "recurse", FibF);
7474

7575
// Create the "if (arg <= 2) goto exitbb"
76-
Value *CondInst = new ICmpInst(*BB, ICmpInst::ICMP_SLE, ArgX, Two, "cond");
76+
Value *CondInst = new ICmpInst(BB, ICmpInst::ICMP_SLE, ArgX, Two, "cond");
7777
BranchInst::Create(RetBB, RecurseBB, CondInst, BB);
7878

7979
// Create: ret int 1

0 commit comments

Comments
 (0)