From 6ddacde514af7cc546caa07fede4baa3e429c33c Mon Sep 17 00:00:00 2001 From: Thomas Lively Date: Fri, 20 Dec 2024 17:45:47 -0800 Subject: [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. --- src/binaryen-c.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/binaryen-c.cpp') diff --git a/src/binaryen-c.cpp b/src/binaryen-c.cpp index 4294d56ea..fa834d268 100644 --- a/src/binaryen-c.cpp +++ b/src/binaryen-c.cpp @@ -1752,7 +1752,8 @@ BinaryenExpressionRef BinaryenStructGet(BinaryenModuleRef module, bool signed_) { return static_cast( Builder(*(Module*)module) - .makeStructGet(index, (Expression*)ref, Type(type), signed_)); + .makeStructGet( + index, (Expression*)ref, MemoryOrder::Unordered, Type(type), signed_)); } BinaryenExpressionRef BinaryenStructSet(BinaryenModuleRef module, BinaryenIndex index, @@ -1760,7 +1761,8 @@ BinaryenExpressionRef BinaryenStructSet(BinaryenModuleRef module, BinaryenExpressionRef value) { return static_cast( Builder(*(Module*)module) - .makeStructSet(index, (Expression*)ref, (Expression*)value)); + .makeStructSet( + index, (Expression*)ref, (Expression*)value, MemoryOrder::Unordered)); } BinaryenExpressionRef BinaryenArrayNew(BinaryenModuleRef module, BinaryenHeapType type, -- cgit v1.2.3