Skip to content

Commit 12d1bc8

Browse files
jansvoboda11Lukacma
authored andcommitted
[mlir] Partially revert llvm#162903 (llvm#164464)
With llvm#163862, this is not really necessary and causes downstream issues.
1 parent d7a04f0 commit 12d1bc8

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)