diff --git a/third_party/mlir/lib/IR/Diagnostics.cpp b/third_party/mlir/lib/IR/Diagnostics.cpp index 076a9b21ae5c5de279ea63effb6398e51eb1cc13..28894066023c61cad9ead2b98ce590d3db51dec0 100644 --- a/third_party/mlir/lib/IR/Diagnostics.cpp +++ b/third_party/mlir/lib/IR/Diagnostics.cpp @@ -415,12 +415,10 @@ void SourceMgrDiagnosticHandler::emitDiagnostic(Location loc, Twine message, if (smloc.isValid()) return mgr.PrintMessage(os, smloc, getDiagKind(kind), message); - // If the conversion was unsuccessful, create a diagnostic with the source - // location information directly. - llvm::SMDiagnostic diag(mgr, llvm::SMLoc(), fileLoc->getFilename(), - fileLoc->getLine(), fileLoc->getColumn(), - getDiagKind(kind), message.str(), /*LineStr=*/"", - /*Ranges=*/llvm::None); + // If the conversion was unsuccessful, create a diagnostic with the file + // information. + llvm::SMDiagnostic diag(fileLoc->getFilename(), getDiagKind(kind), + message.str()); diag.print(nullptr, os); }