summaryrefslogtreecommitdiff
path: root/src/wasm-io.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/wasm-io.h')
-rw-r--r--src/wasm-io.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/wasm-io.h b/src/wasm-io.h
index ad6b358fd..77d2506c4 100644
--- a/src/wasm-io.h
+++ b/src/wasm-io.h
@@ -29,6 +29,10 @@ namespace wasm {
class ModuleReader {
public:
+ // If DWARF support is enabled, we track the locations of all IR nodes in
+ // the binary, so that we can update DWARF sections later when writing.
+ void setDWARF(bool DWARF_) { DWARF = DWARF_; }
+
// read text
void readText(std::string filename, Module& wasm);
// read binary
@@ -43,7 +47,13 @@ public:
bool isBinaryFile(std::string filename);
private:
+ bool DWARF = false;
+
void readStdin(Module& wasm, std::string sourceMapFilename);
+
+ void readBinaryData(std::vector<char>& input,
+ Module& wasm,
+ std::string sourceMapFilename);
};
class ModuleWriter {