[Mlir-commits] [mlir] e1e4154 - [mlir] Partially revert #162903 (#164464)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Tue Oct 21 10:38:30 PDT 2025
Author: Jan Svoboda
Date: 2025-10-21T17:38:26Z
New Revision: e1e4154023a81f013c4fcf5d202ffba6033295de
URL: https://github.com/llvm/llvm-project/commit/e1e4154023a81f013c4fcf5d202ffba6033295de
DIFF: https://github.com/llvm/llvm-project/commit/e1e4154023a81f013c4fcf5d202ffba6033295de.diff
LOG: [mlir] Partially revert #162903 (#164464)
With #163862, this is not really necessary and causes downstream issues.
Added:
Modified:
mlir/lib/IR/Diagnostics.cpp
Removed:
################################################################################
diff --git a/mlir/lib/IR/Diagnostics.cpp b/mlir/lib/IR/Diagnostics.cpp
index 4d819188fa555..776b5c6588c71 100644
--- a/mlir/lib/IR/Diagnostics.cpp
+++ b/mlir/lib/IR/Diagnostics.cpp
@@ -378,10 +378,8 @@ struct SourceMgrDiagnosticHandlerImpl {
}
// Otherwise, try to load the source file.
- auto bufferOrErr = llvm::MemoryBuffer::getFile(filename);
- if (!bufferOrErr)
- return 0;
- unsigned id = mgr.AddNewSourceBuffer(std::move(*bufferOrErr), SMLoc());
+ std::string ignored;
+ unsigned id = mgr.AddIncludeFile(std::string(filename), SMLoc(), ignored);
filenameToBufId[filename] = id;
return id;
}
More information about the Mlir-commits
mailing list