summaryrefslogtreecommitdiff
path: root/src/pass.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/pass.h')
-rw-r--r--src/pass.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/pass.h b/src/pass.h
index 0a9cc251f..5c1315844 100644
--- a/src/pass.h
+++ b/src/pass.h
@@ -171,9 +171,9 @@ struct PassRunner {
doAdd(pass);
}
- template<class P> void add() { doAdd(new P()); }
-
- template<class P, class Arg> void add(Arg arg) { doAdd(new P(arg)); }
+ template<class P, class... Args> void add(Args&&... args) {
+ doAdd(new P(std::forward<Args>(args)...));
+ }
// Adds the default set of optimization passes; this is
// what -O does.