summaryrefslogtreecommitdiff
path: root/src/support/path.h
diff options
context:
space:
mode:
authorAlon Zakai <azakai@google.com>2019-10-17 17:29:32 -0700
committerGitHub <noreply@github.com>2019-10-17 17:29:32 -0700
commitd2550891e41ad0215b1cae46fa711bc1e264166a (patch)
tree7d102696ad01ff5eb76de33cf7a89eb3068d9350 /src/support/path.h
parent83f61457fd10feffe8cdcc6c278bc79cfb1667aa (diff)
downloadbinaryen-d2550891e41ad0215b1cae46fa711bc1e264166a.tar.gz
binaryen-d2550891e41ad0215b1cae46fa711bc1e264166a.tar.bz2
binaryen-d2550891e41ad0215b1cae46fa711bc1e264166a.zip
Fix autoreducing when not in the binaryen directory (#2390)
This uses argv[0] as the default way to find the location of the wasm binaries (wasm-reduce needs to call wasm-opt).
Diffstat (limited to 'src/support/path.h')
-rw-r--r--src/support/path.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/support/path.h b/src/support/path.h
index 505ba0d88..e9f675142 100644
--- a/src/support/path.h
+++ b/src/support/path.h
@@ -28,7 +28,9 @@ namespace wasm {
namespace Path {
-std::string getPathSeparator();
+char getPathSeparator();
+std::string getDirName(const std::string& path);
+std::string getBaseName(const std::string& path);
// Get the binaryen root dor.
std::string getBinaryenRoot();
@@ -37,10 +39,10 @@ std::string getBinaryenRoot();
std::string getBinaryenBinDir();
// Set the binaryen bin dir (allows tools to change it based on user input).
-void setBinaryenBinDir(std::string dir);
+void setBinaryenBinDir(const std::string& dir);
// Gets the path to a binaryen binary tool, like wasm-opt.
-std::string getBinaryenBinaryTool(std::string name);
+std::string getBinaryenBinaryTool(const std::string& name);
} // namespace Path