Skip to content

Commit e1a6e4d

Browse files
committed
Fix erroneous conditional
1 parent 381b3ce commit e1a6e4d

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

mlir/lib/IR/AsmPrinter.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2014,8 +2014,8 @@ void AsmPrinter::Impl::printLocationInternal(LocationAttr loc, bool pretty,
20142014
os << loc.getFilename().getValue();
20152015
else
20162016
printEscapedString(loc.getFilename());
2017-
if (loc.getStartLine() == loc.getStartColumn() == loc.getEndLine() ==
2018-
loc.getEndColumn() == 0) {
2017+
if (loc.getStartLine() == 0 && loc.getStartColumn() == 0 &&
2018+
loc.getEndLine() == 0 && loc.getEndColumn() == 0) {
20192019
return;
20202020
}
20212021
if (loc.getStartColumn() == 0 &&

mlir/lib/IR/BuiltinDialectBytecode.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,8 @@ readFileLineColRangeLocs(DialectBytecodeReader &reader,
113113

114114
static void writeFileLineColRangeLocs(DialectBytecodeWriter &writer,
115115
FileLineColRange range) {
116-
if (range.getStartLine() == range.getStartColumn() == range.getEndLine() ==
117-
range.getEndColumn() == 0) {
116+
if (range.getStartLine() == 0 && range.getStartColumn() == 0 &&
117+
range.getEndLine() == 0 && range.getEndColumn() == 0) {
118118
writer.writeVarInt(0);
119119
return;
120120
}

0 commit comments

Comments
 (0)