[clang] Fix Twine usage (PR #90728)
via cfe-commits
cfe-commits at lists.llvm.org
Wed May 1 05:18:25 PDT 2024
https://github.com/MagentaTreehouse created https://github.com/llvm/llvm-project/pull/90728
Construct `Twine`s before concatenation.
>From ad0384030a78be7d91851c565db41af1b161378f Mon Sep 17 00:00:00 2001
From: Mingyi Chen <cmingyi01 at gmail.com>
Date: Wed, 1 May 2024 08:10:27 -0400
Subject: [PATCH] Fix Twine usage
---
clang/lib/Driver/ToolChains/HIPUtility.cpp | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/clang/lib/Driver/ToolChains/HIPUtility.cpp b/clang/lib/Driver/ToolChains/HIPUtility.cpp
index 08c647dfcb6f72..e696d43bb3211b 100644
--- a/clang/lib/Driver/ToolChains/HIPUtility.cpp
+++ b/clang/lib/Driver/ToolChains/HIPUtility.cpp
@@ -106,9 +106,8 @@ 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());
- GPUBinHandleSymbols.insert(
- Twine(GPUBinHandlePrefix + "_" + ID).str());
+ FatBinSymbols.insert((Twine(FatBinPrefix) + '_' + ID).str());
+ GPUBinHandleSymbols.insert((Twine(GPUBinHandlePrefix) + '_' + ID).str());
continue;
}
if (IA->getInputArg().getNumValues() == 0)
More information about the cfe-commits
mailing list