[clang] [Clang] Do not emit multi-gpu warning if they are all the same (PR #185490)
Matt Arsenault via cfe-commits
cfe-commits at lists.llvm.org
Tue Mar 10 03:53:41 PDT 2026
================
@@ -735,11 +736,10 @@ AMDGPUToolChain::TranslateArgs(const DerivedArgList &Args, StringRef BoundArch,
<< llvm::toString(GPUsOrErr.takeError()) << "-mcpu";
} else {
auto &GPUs = *GPUsOrErr;
- if (GPUs.size() > 1) {
+ if (llvm::SmallSet<std::string, 1>(GPUs.begin(), GPUs.end()).size() > 1)
----------------
arsenm wrote:
SmallString? Also use the set to start instead of creating the temporary?
https://github.com/llvm/llvm-project/pull/185490
More information about the cfe-commits
mailing list