Skip to content

Commit

Permalink
Fix build against LLVM 14 (Git main) (JuliaLang#43722)
Browse files Browse the repository at this point in the history
4c45f29 had reintroduced
a use of getNumArgOperands(), which was already slated for
removal in (at least) LLVM 12.
  • Loading branch information
dnadlinger authored and LilithHafner committed Feb 22, 2022
1 parent 71c6cb5 commit 296a6e3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/llvm-julia-licm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ struct JuliaLICMPass : public LoopPass, public JuliaPassContext {
}
else if (callee == write_barrier_func) {
bool valid = true;
for (std::size_t i = 0; i < call->getNumArgOperands(); i++) {
for (std::size_t i = 0; i < call->arg_size(); i++) {
if (!L->makeLoopInvariant(call->getArgOperand(i), changed)) {
valid = false;
break;
Expand All @@ -139,7 +139,7 @@ struct JuliaLICMPass : public LoopPass, public JuliaPassContext {
continue;
}
bool valid = true;
for (std::size_t i = 0; i < call->getNumArgOperands(); i++) {
for (std::size_t i = 0; i < call->arg_size(); i++) {
if (!L->makeLoopInvariant(call->getArgOperand(i), changed)) {
valid = false;
break;
Expand Down

0 comments on commit 296a6e3

Please sign in to comment.