diff options
Diffstat (limited to 'src/passes/Metrics.cpp')
-rw-r--r-- | src/passes/Metrics.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/passes/Metrics.cpp b/src/passes/Metrics.cpp index d2e072a6f..1778eb9bd 100644 --- a/src/passes/Metrics.cpp +++ b/src/passes/Metrics.cpp @@ -94,7 +94,7 @@ struct Metrics printCounts("global"); // compute binary info, so we know function sizes BufferWithRandomAccess buffer; - WasmBinaryWriter writer(module, buffer); + WasmBinaryWriter writer(module, buffer, getPassOptions()); writer.write(); // print for each function Index binaryIndex = 0; @@ -108,14 +108,14 @@ struct Metrics }); // print for each export how much code size is due to it, i.e., // how much the module could shrink without it. - auto sizeAfterGlobalCleanup = [](Module* module) { + auto sizeAfterGlobalCleanup = [&](Module* module) { PassRunner runner(module, PassOptions::getWithDefaultOptimizationOptions()); runner.setIsNested(true); runner.addDefaultGlobalOptimizationPostPasses(); // remove stuff runner.run(); BufferWithRandomAccess buffer; - WasmBinaryWriter writer(module, buffer); + WasmBinaryWriter writer(module, buffer, getPassOptions()); writer.write(); return buffer.size(); }; |