Skip to content

Commit e1e4154

Browse files
authored
[mlir] Partially revert #162903 (#164464)
With #163862, this is not really necessary and causes downstream issues.
1 parent d019a02 commit e1e4154

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

mlir/lib/IR/Diagnostics.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -378,10 +378,8 @@ struct SourceMgrDiagnosticHandlerImpl {
378378
}
379379

380380
// Otherwise, try to load the source file.
381-
auto bufferOrErr = llvm::MemoryBuffer::getFile(filename);
382-
if (!bufferOrErr)
383-
return 0;
384-
unsigned id = mgr.AddNewSourceBuffer(std::move(*bufferOrErr), SMLoc());
381+
std::string ignored;
382+
unsigned id = mgr.AddIncludeFile(std::string(filename), SMLoc(), ignored);
385383
filenameToBufId[filename] = id;
386384
return id;
387385
}

0 commit comments

Comments
 (0)