summaryrefslogtreecommitdiff
path: root/src/wasm-ir-builder.h
diff options
context:
space:
mode:
authorThomas Lively <tlively@google.com>2024-12-20 17:45:47 -0800
committerGitHub <noreply@github.com>2024-12-21 01:45:47 +0000
commit6ddacde514af7cc546caa07fede4baa3e429c33c (patch)
tree3436a22906ae3b94d3308e738a31d3db559bf246 /src/wasm-ir-builder.h
parent4d8a933e1136159160f2b45ad3a9a1c82021a75b (diff)
downloadbinaryen-6ddacde514af7cc546caa07fede4baa3e429c33c.tar.gz
binaryen-6ddacde514af7cc546caa07fede4baa3e429c33c.tar.bz2
binaryen-6ddacde514af7cc546caa07fede4baa3e429c33c.zip
[NFC] Make MemoryOrder parameters non-optional (#7171)
Update Builder and IRBuilder makeStructGet and makeStructSet functions to require the memory order to be explicitly supplied. This is slightly more verbose, but will reduce the chances that we forget to properly consider synchronization when implementing new features in the future.
Diffstat (limited to 'src/wasm-ir-builder.h')
-rw-r--r--src/wasm-ir-builder.h10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/wasm-ir-builder.h b/src/wasm-ir-builder.h
index a40e8df82..c46f9f2ca 100644
--- a/src/wasm-ir-builder.h
+++ b/src/wasm-ir-builder.h
@@ -204,13 +204,9 @@ public:
makeBrOn(Index label, BrOnOp op, Type in = Type::none, Type out = Type::none);
Result<> makeStructNew(HeapType type);
Result<> makeStructNewDefault(HeapType type);
- Result<> makeStructGet(HeapType type,
- Index field,
- bool signed_,
- MemoryOrder order = MemoryOrder::Unordered);
- Result<> makeStructSet(HeapType type,
- Index field,
- MemoryOrder order = MemoryOrder::Unordered);
+ Result<>
+ makeStructGet(HeapType type, Index field, bool signed_, MemoryOrder order);
+ Result<> makeStructSet(HeapType type, Index field, MemoryOrder order);
Result<> makeArrayNew(HeapType type);
Result<> makeArrayNewDefault(HeapType type);
Result<> makeArrayNewData(HeapType type, Name data);