diff options
author | Thomas Lively <tlively@google.com> | 2024-12-20 17:45:47 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-12-21 01:45:47 +0000 |
commit | 6ddacde514af7cc546caa07fede4baa3e429c33c (patch) | |
tree | 3436a22906ae3b94d3308e738a31d3db559bf246 /src/binaryen-c.cpp | |
parent | 4d8a933e1136159160f2b45ad3a9a1c82021a75b (diff) | |
download | binaryen-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/binaryen-c.cpp')
-rw-r--r-- | src/binaryen-c.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
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<Expression*>( 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<Expression*>( Builder(*(Module*)module) - .makeStructSet(index, (Expression*)ref, (Expression*)value)); + .makeStructSet( + index, (Expression*)ref, (Expression*)value, MemoryOrder::Unordered)); } BinaryenExpressionRef BinaryenArrayNew(BinaryenModuleRef module, BinaryenHeapType type, |