Skip to content

Commit

Permalink
[TableGen][SourceMgr] Fix obvious mistake in D141220
Browse files Browse the repository at this point in the history
It now tried to open the IncludedFile instead of the Filename, which was not intended.
  • Loading branch information
zero9178 committed Jan 9, 2023
1 parent 17a1936 commit 90b5afe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion llvm/lib/Support/SourceMgr.cpp
Expand Up @@ -53,7 +53,7 @@ ErrorOr<std::unique_ptr<MemoryBuffer>>
SourceMgr::OpenIncludeFile(const std::string &Filename,
std::string &IncludedFile) {
ErrorOr<std::unique_ptr<MemoryBuffer>> NewBufOrErr =
MemoryBuffer::getFile(IncludedFile);
MemoryBuffer::getFile(Filename);

SmallString<64> Buffer(Filename);
// If the file didn't exist directly, see if it's in an include path.
Expand Down

0 comments on commit 90b5afe

Please sign in to comment.