diff options
author | Shravan Narayan <shravanrn@gmail.com> | 2024-10-12 23:50:12 -0500 |
---|---|---|
committer | Shravan Narayan <shravanrn@gmail.com> | 2024-10-14 21:39:40 -0500 |
commit | 2b4e2c7664a61c94fc316a0d526913634c4ff7e6 (patch) | |
tree | b5fb6365cadc76155525d5a8a4ec86d0d1f6c099 /src/c-writer.cc | |
parent | 7fdccf7147e7c33e5a13a9c099bdafbc4d3d62e2 (diff) | |
download | wabt-2b4e2c7664a61c94fc316a0d526913634c4ff7e6.tar.gz wabt-2b4e2c7664a61c94fc316a0d526913634c4ff7e6.tar.bz2 wabt-2b4e2c7664a61c94fc316a0d526913634c4ff7e6.zip |
wasm2c: Cleanup of handling of WASM_RT_USE_SEGUE macro
Diffstat (limited to 'src/c-writer.cc')
-rw-r--r-- | src/c-writer.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/c-writer.cc b/src/c-writer.cc index 52a75299..a698cd59 100644 --- a/src/c-writer.cc +++ b/src/c-writer.cc @@ -2506,7 +2506,8 @@ bool CWriter::IsSingleUnsharedMemory() { } void CWriter::InstallSegueBase(Memory* memory, bool save_old_value) { - NonIndented([&] { Write("#if WASM_RT_USE_SEGUE", Newline()); }); + NonIndented( + [&] { Write("#if WASM_RT_USE_SEGUE_FOR_THIS_MODULE", Newline()); }); if (save_old_value) { NonIndented([&] { Write("#if !WASM_RT_SEGUE_FREE_SEGMENT", Newline()); }); Write("void* segue_saved_base = wasm_rt_segue_read_base();", Newline()); @@ -2520,7 +2521,9 @@ void CWriter::InstallSegueBase(Memory* memory, bool save_old_value) { void CWriter::RestoreSegueBase() { NonIndented([&] { - Write("#if WASM_RT_USE_SEGUE && !WASM_RT_SEGUE_FREE_SEGMENT", Newline()); + Write( + "#if WASM_RT_USE_SEGUE_FOR_THIS_MODULE && !WASM_RT_SEGUE_FREE_SEGMENT", + Newline()); }); Write("wasm_rt_segue_write_base(segue_saved_base);", Newline()); NonIndented([&] { Write("#endif", Newline()); }); |