diff options
Diffstat (limited to 'src/ir')
-rw-r--r-- | src/ir/ReFinalize.cpp | 2 | ||||
-rw-r--r-- | src/ir/abstract.h | 4 | ||||
-rw-r--r-- | src/ir/bits.h | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/src/ir/ReFinalize.cpp b/src/ir/ReFinalize.cpp index 41bca48d4..822fc5808 100644 --- a/src/ir/ReFinalize.cpp +++ b/src/ir/ReFinalize.cpp @@ -186,7 +186,7 @@ void ReFinalize::replaceUntaken(Expression* value, Expression* condition) { condition = builder.makeDrop(condition); } replacement = builder.makeSequence(value, condition); - assert(replacement->type.getSingle()); + assert(replacement->type.isBasic() && "Basic type expected"); } replaceCurrent(replacement); } diff --git a/src/ir/abstract.h b/src/ir/abstract.h index 687412455..f706e9972 100644 --- a/src/ir/abstract.h +++ b/src/ir/abstract.h @@ -61,7 +61,7 @@ enum Op { // you can provide i32 and Add and receive the specific opcode for a 32-bit // addition, AddInt32. If the op does not exist, it returns Invalid. inline UnaryOp getUnary(Type type, Op op) { - switch (type.getSingle()) { + switch (type.getBasic()) { case Type::i32: { switch (op) { case EqZ: @@ -114,7 +114,7 @@ inline UnaryOp getUnary(Type type, Op op) { } inline BinaryOp getBinary(Type type, Op op) { - switch (type.getSingle()) { + switch (type.getBasic()) { case Type::i32: { switch (op) { case Add: diff --git a/src/ir/bits.h b/src/ir/bits.h index e0bca8d87..20d97f13f 100644 --- a/src/ir/bits.h +++ b/src/ir/bits.h @@ -129,7 +129,7 @@ template<typename LocalInfoProvider = DummyLocalInfoProvider> Index getMaxBits(Expression* curr, LocalInfoProvider* localInfoProvider = nullptr) { if (auto* const_ = curr->dynCast<Const>()) { - switch (curr->type.getSingle()) { + switch (curr->type.getBasic()) { case Type::i32: return 32 - const_->value.countLeadingZeroes().geti32(); case Type::i64: @@ -256,7 +256,7 @@ Index getMaxBits(Expression* curr, return 8 * load->bytes; } } - switch (curr->type.getSingle()) { + switch (curr->type.getBasic()) { case Type::i32: return 32; case Type::i64: |