Skip to content

Commit

Permalink
fix build with latest LLVM
Browse files Browse the repository at this point in the history
  • Loading branch information
nunoplopes committed Oct 14, 2024
1 parent 135991e commit 3127683
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tools/quick-fuzz.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -546,7 +546,7 @@ class ValueGenerator {
if (Op == Intrinsic::abs || Op == Intrinsic::ctlz || Op == Intrinsic::cttz)
Args.push_back(ConstantInt::get(Type::getInt1Ty(Ctx), C.flip() ? 1 : 0));

auto Decl = Intrinsic::getDeclaration(M, Op, Ty);
auto Decl = Intrinsic::getOrInsertDeclaration(M, Op, Ty);
auto *I = CallInst::Create(Decl, Args, "", BB);
return I;
}
Expand Down Expand Up @@ -610,7 +610,7 @@ class ValueGenerator {
assert(false);
}

auto Decl = Intrinsic::getDeclaration(M, Op, Ty);
auto Decl = Intrinsic::getOrInsertDeclaration(M, Op, Ty);
auto *I = CallInst::Create(Decl, {LHS, RHS}, "", BB);
if (Op == Intrinsic::ssub_with_overflow ||
Op == Intrinsic::usub_with_overflow ||
Expand Down Expand Up @@ -664,7 +664,7 @@ class ValueGenerator {
Type::getInt32Ty(BB->getContext()))
: getVal(Ty);

auto Decl = Intrinsic::getDeclaration(M, Op, Ty);
auto Decl = Intrinsic::getOrInsertDeclaration(M, Op, Ty);
auto *I = CallInst::Create(Decl, {A, B, C}, "", BB);
return I;
}
Expand Down

0 comments on commit 3127683

Please sign in to comment.