[llvm] 7d7f358 - [llvm-profdata] Simplify a string equality comparison (NFC)

Kazu Hirata via llvm-commits llvm-commits at lists.llvm.org
Sat Jan 27 22:20:38 PST 2024


Author: Kazu Hirata
Date: 2024-01-27T22:20:27-08:00
New Revision: 7d7f358cee659564358904584a871facfd5f765b

URL: https://github.com/llvm/llvm-project/commit/7d7f358cee659564358904584a871facfd5f765b
DIFF: https://github.com/llvm/llvm-project/commit/7d7f358cee659564358904584a871facfd5f765b.diff

LOG: [llvm-profdata] Simplify a string equality comparison (NFC)

Added: 
    

Modified: 
    llvm/tools/llvm-profdata/llvm-profdata.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/tools/llvm-profdata/llvm-profdata.cpp b/llvm/tools/llvm-profdata/llvm-profdata.cpp
index 239aa1c93a2c7e..7754ca36125720 100644
--- a/llvm/tools/llvm-profdata/llvm-profdata.cpp
+++ b/llvm/tools/llvm-profdata/llvm-profdata.cpp
@@ -1303,7 +1303,7 @@ static void supplementInstrProfile(const WeightedFileVector &Inputs,
                                    unsigned SupplMinSizeThreshold,
                                    float ZeroCounterThreshold,
                                    unsigned InstrProfColdThreshold) {
-  if (OutputFilename.compare("-") == 0)
+  if (OutputFilename == "-")
     exitWithError("cannot write indexed profdata format to stdout");
   if (Inputs.size() != 1)
     exitWithError("expect one input to be an instr profile");


        


More information about the llvm-commits mailing list