[clang] Fix Twine usage (PR #90728)
via cfe-commits
cfe-commits at lists.llvm.org
Wed May 1 05:34:28 PDT 2024
https://github.com/MagentaTreehouse updated https://github.com/llvm/llvm-project/pull/90728
>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 1/2] 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)
>From 4c74628025115a7d004725c3254f38d32bd25627 Mon Sep 17 00:00:00 2001
From: Mingyi Chen <cmingyi01 at gmail.com>
Date: Wed, 1 May 2024 08:33:39 -0400
Subject: [PATCH 2/2] Fix formatting
---
clang/lib/Driver/ToolChains/HIPUtility.cpp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/clang/lib/Driver/ToolChains/HIPUtility.cpp b/clang/lib/Driver/ToolChains/HIPUtility.cpp
index e696d43bb3211b..e535b9f2f3502b 100644
--- a/clang/lib/Driver/ToolChains/HIPUtility.cpp
+++ b/clang/lib/Driver/ToolChains/HIPUtility.cpp
@@ -107,7 +107,8 @@ class HIPUndefinedFatBinSymbols {
if (!ID.empty()) {
ID = llvm::utohexstr(llvm::MD5Hash(ID), /*LowerCase=*/true);
FatBinSymbols.insert((Twine(FatBinPrefix) + '_' + ID).str());
- GPUBinHandleSymbols.insert((Twine(GPUBinHandlePrefix) + '_' + ID).str());
+ GPUBinHandleSymbols.insert(
+ (Twine(GPUBinHandlePrefix) + '_' + ID).str());
continue;
}
if (IA->getInputArg().getNumValues() == 0)
More information about the cfe-commits
mailing list