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.
2 parents 97448c5 + e1e4154 commit 834fe4eCopy full SHA for 834fe4e
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