Commit 2b223bd1 authored by Alexandre Ganea's avatar Alexandre Ganea
Browse files

[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]
parent fb170fd6
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1840,7 +1840,7 @@ void OperationPrinter::printValueIDImpl(Value value, bool printResultNo,
  }

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

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

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