Skip to content

Commit 2b223bd

Browse files
committed
[mlir] Fix warnings when compiling with Clang 9.0
Fixes: warning: comparison of integers of different signs: 'const unsigned int' and '(anonymous namespace)::OperationPrinter::(anonymous enum at F:\llvm-project\mlir\lib\IR\AsmPrinter.cpp:1444:3)' [-Wsign-compare]
1 parent fb170fd commit 2b223bd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mlir/lib/IR/AsmPrinter.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1840,7 +1840,7 @@ void OperationPrinter::printValueIDImpl(Value value, bool printResultNo,
18401840
}
18411841

18421842
stream << '%';
1843-
if (it->second != nameSentinel) {
1843+
if (it->second != (unsigned)nameSentinel) {
18441844
stream << it->second;
18451845
} else {
18461846
auto nameIt = valueNames.find(lookupValue);
@@ -1876,7 +1876,7 @@ void OperationPrinter::shadowRegionArgs(Region &region, ValueRange namesToUse) {
18761876
printValueIDImpl(nameToUse, /*printResultNo=*/true, nameStream);
18771877

18781878
// Entry block arguments should already have a pretty "arg" name.
1879-
assert(valueIDs[nameToReplace] == nameSentinel);
1879+
assert(valueIDs[nameToReplace] == (unsigned)nameSentinel);
18801880

18811881
// Use the name without the leading %.
18821882
auto name = StringRef(nameStream.str()).drop_front();

0 commit comments

Comments
 (0)