[Mlir-commits] [mlir] Add unreachable case for bad Extension type in TosaProfileCompliance (PR #128889)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Wed Feb 26 07:07:53 PST 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-mlir
Author: wheatfox (enkerewpo)
<details>
<summary>Changes</summary>
add `llvm_unreachable` at the end of `getCooperativeProfiles` to eliminate compiler warning of "control reaches end of non-void function"
---
Full diff: https://github.com/llvm/llvm-project/pull/128889.diff
1 Files Affected:
- (modified) mlir/include/mlir/Dialect/Tosa/IR/TosaProfileCompliance.h (+1)
``````````diff
diff --git a/mlir/include/mlir/Dialect/Tosa/IR/TosaProfileCompliance.h b/mlir/include/mlir/Dialect/Tosa/IR/TosaProfileCompliance.h
index 064264e73c8af..969d06afc70d6 100644
--- a/mlir/include/mlir/Dialect/Tosa/IR/TosaProfileCompliance.h
+++ b/mlir/include/mlir/Dialect/Tosa/IR/TosaProfileCompliance.h
@@ -148,6 +148,7 @@ class TosaProfileCompliance {
case Extension::none:
return {};
};
+ llvm_unreachable("bad Extension type");
}
// Debug utilites.
``````````
</details>
https://github.com/llvm/llvm-project/pull/128889
More information about the Mlir-commits
mailing list