Skip to content

Commit

Permalink
[flang] Fix -Wstring-conversion in PPCIntrinsicCall.cpp (NFC)
Browse files Browse the repository at this point in the history
/Users/jiefu/llvm-project/flang/lib/Optimizer/Builder/PPCIntrinsicCall.cpp:617:14: error: implicit conversion turns string literal into bool: 'const char[39]' to 'bool' [-Werror,-Wstring-conversion]
      assert("Invalid vector operation for generator");
      ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  • Loading branch information
DamonFool committed Jul 3, 2023
1 parent e435129 commit e4d6860
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions flang/lib/Optimizer/Builder/PPCIntrinsicCall.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -614,7 +614,7 @@ PPCIntrinsicLibrary::genVecCmp(mlir::Type resultType,
break;
}
default:
assert("Invalid vector operation for generator");
assert(false && "Invalid vector operation for generator");
}
} else if (vecTyInfo.isFloat()) {
mlir::Value vargs[2];
Expand All @@ -631,12 +631,12 @@ PPCIntrinsicLibrary::genVecCmp(mlir::Type resultType,
vargs[1] = argBases[0];
break;
default:
assert("Invalid vector operation for generator");
assert(false && "Invalid vector operation for generator");
}
auto callOp{builder.create<fir::CallOp>(loc, funcOp, vargs)};
res = callOp.getResult(0);
} else
assert("invalid vector type");
assert(false && "invalid vector type");

return res;
}
Expand Down

0 comments on commit e4d6860

Please sign in to comment.