aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/FrontendAction.cpp
diff options
context:
space:
mode:
authorYuki Okushi <jtitor@2k36.org>2022-06-11 01:36:55 +0900
committerYuki Okushi <jtitor@2k36.org>2022-06-18 23:48:30 +0900
commit7eb046624f2a35f32f0821c91ad5c6a26f250e5f (patch)
tree7b99da43e7c5d61eb42cc0d9b762c986df7060a1 /clang/lib/Frontend/FrontendAction.cpp
parent4533e6aab8bfe73552a6aab12b5fd21cb679fa03 (diff)
downloadllvm-7eb046624f2a35f32f0821c91ad5c6a26f250e5f.zip
llvm-7eb046624f2a35f32f0821c91ad5c6a26f250e5f.tar.gz
llvm-7eb046624f2a35f32f0821c91ad5c6a26f250e5f.tar.bz2
Prefer `getCurrentFileOrBufferName` in `FrontendAction::EndSourceFile`
`getCurrentFile` here causes an assertion on some condition. `getCurrentFileOrBufferName` is preferrable instead. llvm#55950 Differential Revision: https://reviews.llvm.org/D127509
Diffstat (limited to 'clang/lib/Frontend/FrontendAction.cpp')
-rw-r--r--clang/lib/Frontend/FrontendAction.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Frontend/FrontendAction.cpp b/clang/lib/Frontend/FrontendAction.cpp
index 6b1f636..65160dd 100644
--- a/clang/lib/Frontend/FrontendAction.cpp
+++ b/clang/lib/Frontend/FrontendAction.cpp
@@ -1075,7 +1075,7 @@ void FrontendAction::EndSourceFile() {
}
if (CI.getFrontendOpts().ShowStats) {
- llvm::errs() << "\nSTATISTICS FOR '" << getCurrentFile() << "':\n";
+ llvm::errs() << "\nSTATISTICS FOR '" << getCurrentFileOrBufferName() << "':\n";
CI.getPreprocessor().PrintStats();
CI.getPreprocessor().getIdentifierTable().PrintStats();
CI.getPreprocessor().getHeaderSearchInfo().PrintStats();