summaryrefslogtreecommitdiff
path: root/src/tools/wasm-split/instrumenter.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/wasm-split/instrumenter.h')
-rw-r--r--src/tools/wasm-split/instrumenter.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/tools/wasm-split/instrumenter.h b/src/tools/wasm-split/instrumenter.h
index 4f714fde9..7de5a9135 100644
--- a/src/tools/wasm-split/instrumenter.h
+++ b/src/tools/wasm-split/instrumenter.h
@@ -18,6 +18,8 @@
#define wasm_tools_wasm_split_instrumenter_h
#include "pass.h"
+#include "split-options.h"
+#include "wasm.h"
namespace wasm {
@@ -28,15 +30,17 @@ struct Instrumenter : public Pass {
PassRunner* runner = nullptr;
Module* wasm = nullptr;
- const std::string& profileExport;
+ const WasmSplitOptions& options;
uint64_t moduleHash;
Name counterGlobal;
std::vector<Name> functionGlobals;
- Instrumenter(const std::string& profileExport, uint64_t moduleHash);
+ Instrumenter(const WasmSplitOptions& options, uint64_t moduleHash);
void run(PassRunner* runner, Module* wasm) override;
+
+private:
void addGlobals();
void instrumentFuncs();
void addProfileExport();