summaryrefslogtreecommitdiff
path: root/scripts/clean_c_api_trace.py
diff options
context:
space:
mode:
authorRyoga <ryoga_314@yahoo.co.jp>2019-07-10 06:50:06 +0900
committerAlon Zakai <azakai@google.com>2019-07-09 14:50:06 -0700
commit03a883356bd3aba53b2dfadb424d53b1db04a842 (patch)
tree231b80cef3aac200bfaec9765c705db4ee04f0a4 /scripts/clean_c_api_trace.py
parentcbca5a29865e93ba543d1ede1b13bcc8f32bc1fd (diff)
downloadbinaryen-03a883356bd3aba53b2dfadb424d53b1db04a842.tar.gz
binaryen-03a883356bd3aba53b2dfadb424d53b1db04a842.tar.bz2
binaryen-03a883356bd3aba53b2dfadb424d53b1db04a842.zip
Allows multiple arguments to be passed to PassRunner::add<T>() (#2208)
struct FooPass : public wasm::Pass { FooPass(int a, int b); }; PassRunner runner {module}; runner.add<FooPass>(1, 2); // To allow this This change avoids unnecessary copying and allows us to pass the reference without reference_wrapper. struct BarPass : public wasm::Pass { BarPass(std::ostream& s); }; runner.add<BarPass>(std::cout); // Error (cout is uncopyable) runner.add<BarPass>(std::ref(std::cout)); // OK ↓ runner.add<BarPass>(std::cout); // OK (passed by reference) runner.add<BarPass>(std::ref(std::cout)); // OK
Diffstat (limited to 'scripts/clean_c_api_trace.py')
0 files changed, 0 insertions, 0 deletions