[mlir] Silence error: call to constructor of 'llvm::APInt' is ambiguous

I was getting this error when using Clang 9.0.1 for compiling.

F:\llvm-project\mlir\lib\IR\Builders.cpp(119,27): error: call to constructor of 'llvm::APInt' is ambiguous
                          APInt(32, value, /*isSigned=*/false));
                          ^     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
F:\llvm-project\llvm\include\llvm/ADT/APInt.h(277,3): note: candidate constructor
  APInt(unsigned numBits, uint64_t val, bool isSigned = false)
  ^
F:\llvm-project\llvm\include\llvm/ADT/APInt.h(304,3): note: candidate constructor
  APInt(unsigned numBits, unsigned numWords, const uint64_t bigVal[]);
  ^
1 error generated.
This commit is contained in:
Alexandre Ganea 2020-02-21 10:05:07 -05:00
parent f0c642e822
commit 5125803d34
1 changed files with 1 additions and 1 deletions

View File

@ -116,7 +116,7 @@ IntegerAttr Builder::getSI32IntegerAttr(int32_t value) {
IntegerAttr Builder::getUI32IntegerAttr(uint32_t value) {
return IntegerAttr::get(getIntegerType(32, /*isSigned=*/false),
APInt(32, value, /*isSigned=*/false));
APInt(32, (uint64_t)value, /*isSigned=*/false));
}
IntegerAttr Builder::getI16IntegerAttr(int16_t value) {