[PATCH] D127509: Prefer `getCurrentFileOrBufferName` in `FrontendAction::EndSourceFile`

Yuki Okushi via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Jun 18 07:48:55 PDT 2022


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG7eb046624f2a: Prefer `getCurrentFileOrBufferName` in `FrontendAction::EndSourceFile` (authored by JohnTitor).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D127509/new/

https://reviews.llvm.org/D127509

Files:
  clang/lib/Frontend/FrontendAction.cpp


Index: clang/lib/Frontend/FrontendAction.cpp
===================================================================
--- clang/lib/Frontend/FrontendAction.cpp
+++ clang/lib/Frontend/FrontendAction.cpp
@@ -1075,7 +1075,7 @@
   }
 
   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();


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D127509.438127.patch
Type: text/x-patch
Size: 588 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220618/660f6e62/attachment.bin>


More information about the cfe-commits mailing list