summaryrefslogtreecommitdiff
path: root/src/support/file.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/support/file.cpp')
-rw-r--r--src/support/file.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/support/file.cpp b/src/support/file.cpp
index 2fe636cfd..c10646720 100644
--- a/src/support/file.cpp
+++ b/src/support/file.cpp
@@ -68,6 +68,9 @@ template std::vector<char> wasm::read_file<>(const std::string& , Flags::BinaryO
wasm::Output::Output(const std::string& filename, Flags::BinaryOption binary, Flags::DebugOption debug)
: outfile(), out([this, filename, binary, debug]() {
+ if (filename == "-") {
+ return std::cout.rdbuf();
+ }
std::streambuf *buffer;
if (filename.size()) {
if (debug == Flags::Debug) std::cerr << "Opening '" << filename << "'" << std::endl;