summaryrefslogtreecommitdiff
path: root/src/support/file.h
diff options
context:
space:
mode:
authorAlon Zakai <azakai@google.com>2019-08-30 16:51:09 -0700
committerGitHub <noreply@github.com>2019-08-30 16:51:09 -0700
commitb61f67c33daa45bab1fff1941c42ea41ee8e36a8 (patch)
treecd7ea831bba3f01b61cc8a0f4c6373b0ca0e43b0 /src/support/file.h
parenta537db2a966b1fc959754c3838e3eab04ee7cc77 (diff)
downloadbinaryen-b61f67c33daa45bab1fff1941c42ea41ee8e36a8.tar.gz
binaryen-b61f67c33daa45bab1fff1941c42ea41ee8e36a8.tar.bz2
binaryen-b61f67c33daa45bab1fff1941c42ea41ee8e36a8.zip
Support response files, and use that in Asyncify (#2319)
See emscripten-core/emscripten#9206, the asyncify names can need complex escaping, so this provides an escape hatch.
Diffstat (limited to 'src/support/file.h')
-rw-r--r--src/support/file.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/support/file.h b/src/support/file.h
index 67d63315b..fb3cad564 100644
--- a/src/support/file.h
+++ b/src/support/file.h
@@ -39,12 +39,18 @@ template<typename T>
T read_file(const std::string& filename,
Flags::BinaryOption binary,
Flags::DebugOption debug);
+
// Declare the valid explicit specializations.
extern template std::string
read_file<>(const std::string&, Flags::BinaryOption, Flags::DebugOption);
extern template std::vector<char>
read_file<>(const std::string&, Flags::BinaryOption, Flags::DebugOption);
+// Given a string which may be a response file (i.e., a filename starting
+// with "@"), if it is a response file read it and return that, or if it
+// is not a response file, return it as is.
+std::string read_possible_response_file(const std::string&);
+
class Output {
public:
// An empty filename will open stdout instead.