[clang] 476a6d8 - [NFC] Construct Twines before concatenation (#90728)

via cfe-commits cfe-commits at lists.llvm.org
Tue May 28 23:12:29 PDT 2024


Author: MagentaTreehouse
Date: 2024-05-28T23:12:26-07:00
New Revision: 476a6d81a3648cf638400632c098e9f0ed025f8f

URL: https://github.com/llvm/llvm-project/commit/476a6d81a3648cf638400632c098e9f0ed025f8f
DIFF: https://github.com/llvm/llvm-project/commit/476a6d81a3648cf638400632c098e9f0ed025f8f.diff

LOG: [NFC] Construct Twines before concatenation (#90728)

Construct `Twine`s before concatenation.

Added: 
    

Modified: 
    clang/lib/Driver/ToolChains/HIPUtility.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/Driver/ToolChains/HIPUtility.cpp b/clang/lib/Driver/ToolChains/HIPUtility.cpp
index b1ff697b368b1..f32a23f111e4b 100644
--- a/clang/lib/Driver/ToolChains/HIPUtility.cpp
+++ b/clang/lib/Driver/ToolChains/HIPUtility.cpp
@@ -106,9 +106,9 @@ class HIPUndefinedFatBinSymbols {
         std::string ID = IA->getId().str();
         if (!ID.empty()) {
           ID = llvm::utohexstr(llvm::MD5Hash(ID), /*LowerCase=*/true);
-          FatBinSymbols.insert(Twine(FatBinPrefix + "_" + ID).str());
+          FatBinSymbols.insert((FatBinPrefix + Twine('_') + ID).str());
           GPUBinHandleSymbols.insert(
-              Twine(GPUBinHandlePrefix + "_" + ID).str());
+              (GPUBinHandlePrefix + Twine('_') + ID).str());
           continue;
         }
         if (IA->getInputArg().getNumValues() == 0)


        


More information about the cfe-commits mailing list