[llvm] reland [InlineAsm] wrap ConstraintCode in enum class NFC (PR #66264)
Nick Desaulniers via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 14 09:27:42 PDT 2023
================
@@ -375,11 +373,14 @@ class InlineAsm final : public Value {
return true;
}
- // TODO: convert to enum?
- unsigned getMemoryConstraintID() const {
+ ConstraintCode getMemoryConstraintID() const {
assert((isMemKind() || isFuncKind()) &&
"Not expected mem or function flag!");
- return getData();
+ uint32_t D = getData();
+ assert(D <= static_cast<uint32_t>(ConstraintCode::Max) &&
+ D >= static_cast<uint32_t>(ConstraintCode::Unknown) &&
----------------
nickdesaulniers wrote:
Thanks for the report.
I'm about to delete this newly added code in https://github.com/llvm/llvm-project/pull/66297.
https://github.com/llvm/llvm-project/pull/66264
More information about the llvm-commits
mailing list