[clang] [llvm] [AMDGPU] Report error in clang if wave32 is requested where unsupported (PR #97633)

Shilei Tian via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 3 18:33:10 PDT 2024


================
@@ -188,8 +188,12 @@ bool AMDGPUTargetInfo::initFeatureMap(
 
   // TODO: Should move this logic into TargetParser
   std::string ErrorMsg;
-  if (!insertWaveSizeFeature(CPU, getTriple(), Features, ErrorMsg)) {
-    Diags.Report(diag::err_invalid_feature_combination) << ErrorMsg;
+  bool IsCombinationError;
+  if (!insertWaveSizeFeature(CPU, getTriple(), Features, ErrorMsg,
----------------
shiltian wrote:

It's better to make it return a `std::optional<...>`.

https://github.com/llvm/llvm-project/pull/97633


More information about the cfe-commits mailing list