[clang] Fix Twine usage (PR #90728)
via cfe-commits
cfe-commits at lists.llvm.org
Wed May 1 05:18:57 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-clang
@llvm/pr-subscribers-clang-driver
Author: None (MagentaTreehouse)
<details>
<summary>Changes</summary>
Construct `Twine`s before concatenation.
---
Full diff: https://github.com/llvm/llvm-project/pull/90728.diff
1 Files Affected:
- (modified) clang/lib/Driver/ToolChains/HIPUtility.cpp (+2-3)
``````````diff
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)
``````````
</details>
https://github.com/llvm/llvm-project/pull/90728
More information about the cfe-commits
mailing list