[flang-commits] [flang] [AMDGPU] Fix flang build after #97633 (PR #98231)
Stanislav Mekhanoshin via flang-commits
flang-commits at lists.llvm.org
Tue Jul 9 14:51:52 PDT 2024
https://github.com/rampitec created https://github.com/llvm/llvm-project/pull/98231
None
>From 035d11d1be90a0cc13309715339633097c492fe7 Mon Sep 17 00:00:00 2001
From: Stanislav Mekhanoshin <Stanislav.Mekhanoshin at amd.com>
Date: Tue, 9 Jul 2024 14:51:01 -0700
Subject: [PATCH] [AMDGPU] Fix flang build after #97633
---
flang/lib/Frontend/CompilerInstance.cpp | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/flang/lib/Frontend/CompilerInstance.cpp b/flang/lib/Frontend/CompilerInstance.cpp
index 27c36b7f84d89..d37430e0e5773 100644
--- a/flang/lib/Frontend/CompilerInstance.cpp
+++ b/flang/lib/Frontend/CompilerInstance.cpp
@@ -212,7 +212,6 @@ getExplicitAndImplicitAMDGPUTargetFeatures(clang::DiagnosticsEngine &diags,
const llvm::Triple triple) {
llvm::StringRef cpu = targetOpts.cpu;
llvm::StringMap<bool> implicitFeaturesMap;
- std::string errorMsg;
// Get the set of implicit target features
llvm::AMDGPU::fillAMDGPUFeatureMap(cpu, triple, implicitFeaturesMap);
@@ -222,11 +221,12 @@ getExplicitAndImplicitAMDGPUTargetFeatures(clang::DiagnosticsEngine &diags,
implicitFeaturesMap[userKeyString] = (userFeature[0] == '+');
}
- if (!llvm::AMDGPU::insertWaveSizeFeature(cpu, triple, implicitFeaturesMap,
- errorMsg)) {
+ auto HasError =
+ llvm::AMDGPU::insertWaveSizeFeature(cpu, triple, implicitFeaturesMap);
+ if (HasError.first) {
unsigned diagID = diags.getCustomDiagID(clang::DiagnosticsEngine::Error,
"Unsupported feature ID: %0");
- diags.Report(diagID) << errorMsg.data();
+ diags.Report(diagID) << HasError.second;
return std::string();
}
More information about the flang-commits
mailing list