summaryrefslogtreecommitdiff
path: root/src/passes/SafeHeap.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/passes/SafeHeap.cpp')
-rw-r--r--src/passes/SafeHeap.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/passes/SafeHeap.cpp b/src/passes/SafeHeap.cpp
index 37610a90b..fc6706f3e 100644
--- a/src/passes/SafeHeap.cpp
+++ b/src/passes/SafeHeap.cpp
@@ -176,7 +176,7 @@ struct SafeHeap : public Pass {
load.type = type;
for (Index bytes : {1, 2, 4, 8, 16}) {
load.bytes = bytes;
- if (bytes > getTypeSize(type) || (type == f32 && bytes != 4) ||
+ if (bytes > type.getByteSize() || (type == f32 && bytes != 4) ||
(type == f64 && bytes != 8) || (type == v128 && bytes != 16)) {
continue;
}
@@ -212,7 +212,7 @@ struct SafeHeap : public Pass {
store.type = none;
for (Index bytes : {1, 2, 4, 8, 16}) {
store.bytes = bytes;
- if (bytes > getTypeSize(valueType) ||
+ if (bytes > valueType.getByteSize() ||
(valueType == f32 && bytes != 4) ||
(valueType == f64 && bytes != 8) ||
(valueType == v128 && bytes != 16)) {