Skip to content

Commit 48e038f

Browse files
committed
format
1 parent c6c0727 commit 48e038f

File tree

3 files changed

+19
-14
lines changed

3 files changed

+19
-14
lines changed

src/shell-interface.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,8 @@ struct ShellExternalInterface : ModuleRunner::ExternalInterface {
105105
ModuleRunner* getImportInstance(Importable* import) {
106106
auto it = linkedInstances.find(import->module);
107107
if (it == linkedInstances.end()) {
108-
Fatal() << "getImportInstance: unknown import: " << import->module.str << "."
109-
<< import->base.str;
108+
Fatal() << "getImportInstance: unknown import: " << import->module.str
109+
<< "." << import->base.str;
110110
}
111111
return it->second.get();
112112
}

src/tools/execution-results.h

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,9 @@ struct LoggingExternalInterface : public ShellExternalInterface {
5555
ModuleRunner* instance = nullptr;
5656

5757
public:
58-
LoggingExternalInterface(Loggings& loggings, Module& wasm,
58+
LoggingExternalInterface(
59+
Loggings& loggings,
60+
Module& wasm,
5961
std::map<Name, std::shared_ptr<ModuleRunner>> linkedInstances_ = {})
6062
: ShellExternalInterface(linkedInstances_), loggings(loggings), wasm(wasm) {
6163
for (auto& exp : wasm.exports) {
@@ -284,7 +286,7 @@ struct ExecutionResults {
284286

285287
// Get results of executing a module. Optionally, provide a second module to
286288
// link with it (like fuzz_shell's second module).
287-
void get(Module& wasm, Module* second=nullptr) {
289+
void get(Module& wasm, Module* second = nullptr) {
288290
try {
289291
// Run the first module.
290292
LoggingExternalInterface interface(loggings, wasm);
@@ -295,8 +297,10 @@ struct ExecutionResults {
295297
// Link and run the second module.
296298
std::map<Name, std::shared_ptr<ModuleRunner>> linkedInstances;
297299
linkedInstances["primary"] = instance;
298-
LoggingExternalInterface secondInterface(loggings, *second, linkedInstances);
299-
auto secondInstance = std::make_shared<ModuleRunner>(*second, &secondInterface, linkedInstances);
300+
LoggingExternalInterface secondInterface(
301+
loggings, *second, linkedInstances);
302+
auto secondInstance = std::make_shared<ModuleRunner>(
303+
*second, &secondInterface, linkedInstances);
300304
runModule(*second, *secondInstance, secondInterface);
301305
}
302306
} catch (const TrapException&) {

src/tools/wasm-opt.cpp

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -149,14 +149,15 @@ For more on how to optimize effectively, see
149149
[&](Options* o, const std::string& arguments) {
150150
fuzzExecBefore = fuzzExecAfter = true;
151151
})
152-
.add(
153-
"--fuzz-exec-second",
154-
"",
155-
"A second module to link with the first, for fuzz-exec-before (only "
156-
"before, as optimizations are not applied to it)",
157-
WasmOptOption,
158-
Options::Arguments::One,
159-
[&](Options* o, const std::string& arguments) { fuzzExecSecond = arguments; })
152+
.add("--fuzz-exec-second",
153+
"",
154+
"A second module to link with the first, for fuzz-exec-before (only "
155+
"before, as optimizations are not applied to it)",
156+
WasmOptOption,
157+
Options::Arguments::One,
158+
[&](Options* o, const std::string& arguments) {
159+
fuzzExecSecond = arguments;
160+
})
160161
.add("--extra-fuzz-command",
161162
"-efc",
162163
"An extra command to run on the output before and after optimizing. "

0 commit comments

Comments
 (0)