aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/FrontendAction.cpp
diff options
context:
space:
mode:
authorJan Svoboda <jan_svoboda@apple.com>2023-09-06 13:20:46 -0700
committerJan Svoboda <jan_svoboda@apple.com>2023-09-06 13:23:23 -0700
commit0a9611fd8d8867ec5f2ad4612f7b9cc7e534efe3 (patch)
tree262e0661e9067b0607113c77f929014c35582f0d /clang/lib/Frontend/FrontendAction.cpp
parent8d933ea5ac12cf706ebf818e8720f34660c79797 (diff)
downloadllvm-0a9611fd8d8867ec5f2ad4612f7b9cc7e534efe3.zip
llvm-0a9611fd8d8867ec5f2ad4612f7b9cc7e534efe3.tar.gz
llvm-0a9611fd8d8867ec5f2ad4612f7b9cc7e534efe3.tar.bz2
Revert "[clang] NFCI: Adopt `SourceManager::getFileEntryRefForID()`"
This reverts commit ddbcc10b9e26b18f6a70e23d0611b9da75ffa52f. The 'clang-tidy/checkers/misc/header-include-cycle.cpp' test started failing on Windows: https://lab.llvm.org/buildbot/#/builders/216/builds/26855.
Diffstat (limited to 'clang/lib/Frontend/FrontendAction.cpp')
-rw-r--r--clang/lib/Frontend/FrontendAction.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/Frontend/FrontendAction.cpp b/clang/lib/Frontend/FrontendAction.cpp
index 248558e..2da25be 100644
--- a/clang/lib/Frontend/FrontendAction.cpp
+++ b/clang/lib/Frontend/FrontendAction.cpp
@@ -666,7 +666,7 @@ bool FrontendAction::BeginSourceFile(CompilerInstance &CI,
} else {
auto &OldSM = AST->getSourceManager();
FileID ID = OldSM.getMainFileID();
- if (auto File = OldSM.getFileEntryRefForID(ID))
+ if (auto *File = OldSM.getFileEntryForID(ID))
Input = FrontendInputFile(File->getName(), Kind);
else
Input = FrontendInputFile(OldSM.getBufferOrFake(ID), Kind);
@@ -844,7 +844,7 @@ bool FrontendAction::BeginSourceFile(CompilerInstance &CI,
return false;
}
// We now have the filename...
- FileName = FE->getName();
+ FileName = FE->getFileEntry().getName();
// ... still a header unit, but now use the path as written.
Kind = Input.getKind().withHeaderUnit(InputKind::HeaderUnit_Abs);
Input = FrontendInputFile(FileName, Kind, Input.isSystem());