aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Support/SourceMgr.cpp
diff options
context:
space:
mode:
authorMarkus Böck <markus.boeck02@gmail.com>2023-01-09 11:16:56 +0100
committerMarkus Böck <markus.boeck02@gmail.com>2023-01-09 11:16:56 +0100
commit90b5afeb652e4073d72a513dbdff9c6e1ec10688 (patch)
tree36a22dd5df6589b33a2f50f69ed0146c1ef14768 /llvm/lib/Support/SourceMgr.cpp
parent17a19361223d567c154344f1065b315a93ddc4ba (diff)
downloadllvm-90b5afeb652e4073d72a513dbdff9c6e1ec10688.zip
llvm-90b5afeb652e4073d72a513dbdff9c6e1ec10688.tar.gz
llvm-90b5afeb652e4073d72a513dbdff9c6e1ec10688.tar.bz2
[TableGen][SourceMgr] Fix obvious mistake in D141220
It now tried to open the IncludedFile instead of the Filename, which was not intended.
Diffstat (limited to 'llvm/lib/Support/SourceMgr.cpp')
-rw-r--r--llvm/lib/Support/SourceMgr.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Support/SourceMgr.cpp b/llvm/lib/Support/SourceMgr.cpp
index 7fdd217..8065f0a 100644
--- a/llvm/lib/Support/SourceMgr.cpp
+++ b/llvm/lib/Support/SourceMgr.cpp
@@ -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.