summaryrefslogtreecommitdiff
path: root/rsov/compiler/spirit/pass.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'rsov/compiler/spirit/pass.cpp')
-rw-r--r--rsov/compiler/spirit/pass.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/rsov/compiler/spirit/pass.cpp b/rsov/compiler/spirit/pass.cpp
index 6653f96c..d8c3afe1 100644
--- a/rsov/compiler/spirit/pass.cpp
+++ b/rsov/compiler/spirit/pass.cpp
@@ -17,7 +17,6 @@
#include "pass.h"
#include "module.h"
-#include "word_stream.h"
namespace android {
namespace spirit {
@@ -31,8 +30,7 @@ Module *Pass::run(Module *module, int *error) {
}
return nullptr;
}
- std::unique_ptr<InputWordStream> IS(InputWordStream::Create(words));
- return Deserialize<Module>(*IS);
+ return Deserialize<Module>(words);
}
std::vector<uint32_t> Pass::runAndSerialize(Module *module, int *error) {
@@ -44,9 +42,7 @@ std::vector<uint32_t> Pass::runAndSerialize(Module *module, int *error) {
}
return std::vector<uint32_t>();
}
- std::unique_ptr<OutputWordStream> OS(OutputWordStream::Create());
- m1->Serialize(*OS);
- return OS->getWords();
+ return Serialize<Module>(m1);
}
} // namespace spirit