[llvm] 5b356f2 - Trivial change llvm::CreateInfoOutputFile() to return raw_ostream. NFC

Daniel Sanders via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 31 11:22:37 PDT 2024


Author: Daniel Sanders
Date: 2024-10-31T11:22:22-07:00
New Revision: 5b356f27a00a588d6e872a083b6eefc55d5b6183

URL: https://github.com/llvm/llvm-project/commit/5b356f27a00a588d6e872a083b6eefc55d5b6183
DIFF: https://github.com/llvm/llvm-project/commit/5b356f27a00a588d6e872a083b6eefc55d5b6183.diff

LOG: Trivial change llvm::CreateInfoOutputFile() to return raw_ostream. NFC

This is NFC w.r.t upstream but allows us to return raw_null_ostream in our
downstream fork without changing the interface.

Added: 
    

Modified: 
    llvm/include/llvm/ADT/Statistic.h
    llvm/lib/Support/Timer.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/ADT/Statistic.h b/llvm/include/llvm/ADT/Statistic.h
index a64cfce3ba44a0..aa7197cc6caef9 100644
--- a/llvm/include/llvm/ADT/Statistic.h
+++ b/llvm/include/llvm/ADT/Statistic.h
@@ -177,8 +177,8 @@ void EnableStatistics(bool DoPrintOnExit = true);
 /// Check if statistics are enabled.
 bool AreStatisticsEnabled();
 
-/// Return a file stream to print our output on.
-std::unique_ptr<raw_fd_ostream> CreateInfoOutputFile();
+/// Return a stream to print our output on.
+std::unique_ptr<raw_ostream> CreateInfoOutputFile();
 
 /// Print statistics to the file returned by CreateInfoOutputFile().
 void PrintStatistics();

diff  --git a/llvm/lib/Support/Timer.cpp b/llvm/lib/Support/Timer.cpp
index c1b0fdbc077bb0..634f27f57b00a2 100644
--- a/llvm/lib/Support/Timer.cpp
+++ b/llvm/lib/Support/Timer.cpp
@@ -93,7 +93,7 @@ void llvm::initTimerOptions() {
   *SortTimers;
 }
 
-std::unique_ptr<raw_fd_ostream> llvm::CreateInfoOutputFile() {
+std::unique_ptr<raw_ostream> llvm::CreateInfoOutputFile() {
   const std::string &OutputFilename = getLibSupportInfoOutputFilename();
   if (OutputFilename.empty())
     return std::make_unique<raw_fd_ostream>(2, false); // stderr.


        


More information about the llvm-commits mailing list