We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d7a04f0 commit 12d1bc8Copy full SHA for 12d1bc8
mlir/lib/IR/Diagnostics.cpp
@@ -378,10 +378,8 @@ struct SourceMgrDiagnosticHandlerImpl {
378
}
379
380
// 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());
+ std::string ignored;
+ unsigned id = mgr.AddIncludeFile(std::string(filename), SMLoc(), ignored);
385
filenameToBufId[filename] = id;
386
return id;
387
0 commit comments