summaryrefslogtreecommitdiff
path: root/polly/lib/External/isl/interface/cpp.h
diff options
context:
space:
mode:
Diffstat (limited to 'polly/lib/External/isl/interface/cpp.h')
-rw-r--r--polly/lib/External/isl/interface/cpp.h37
1 files changed, 33 insertions, 4 deletions
diff --git a/polly/lib/External/isl/interface/cpp.h b/polly/lib/External/isl/interface/cpp.h
index 837cdee3e939..55a8fb42eef2 100644
--- a/polly/lib/External/isl/interface/cpp.h
+++ b/polly/lib/External/isl/interface/cpp.h
@@ -14,7 +14,7 @@
* "name" is the name of the method, which may be different
* from the default name derived from "fd".
* "kind" is the type of the method.
- * "callback" stores the callback argument, if any, or NULL.
+ * "callbacks" stores the callback arguments.
*/
struct Method {
enum Kind {
@@ -23,6 +23,10 @@ struct Method {
constructor,
};
+ struct list_combiner;
+ static list_combiner print_combiner(std::ostream &os);
+ static list_combiner empty_combiner();
+
Method(const isl_class &clazz, FunctionDecl *fd,
const std::string &name);
Method(const isl_class &clazz, FunctionDecl *fd);
@@ -33,16 +37,41 @@ struct Method {
virtual clang::ParmVarDecl *get_param(int pos) const;
virtual void print_param_use(ostream &os, int pos) const;
bool is_subclass_mutator() const;
+ static void on_arg_list(int start, int end,
+ const list_combiner &combiner,
+ const std::function<bool(int i)> &on_arg_skip_next);
static void print_arg_list(std::ostream &os, int start, int end,
- const std::function<void(int i)> &print_arg);
+ const std::function<bool(int i)> &print_arg_skip_next);
+ void on_fd_arg_list(int start, int end,
+ const list_combiner &combiner,
+ const std::function<void(int i, int arg)> &on_arg) const;
+ void print_fd_arg_list(std::ostream &os, int start, int end,
+ const std::function<void(int i, int arg)> &print_arg) const;
+ void on_cpp_arg_list(const list_combiner &combiner,
+ const std::function<void(int i, int arg)> &on_arg) const;
+ void on_cpp_arg_list(
+ const std::function<void(int i, int arg)> &on_arg) const;
void print_cpp_arg_list(std::ostream &os,
- const std::function<void(int i)> &print_arg) const;
+ const std::function<void(int i, int arg)> &print_arg) const;
const isl_class &clazz;
FunctionDecl *const fd;
const std::string name;
const enum Kind kind;
- ParmVarDecl *const callback;
+ const std::vector<ParmVarDecl *> callbacks;
+};
+
+/* A data structure expressing how Method::on_arg_list should combine
+ * the arguments.
+ *
+ * In particular, "before" is called before any argument is handled;
+ * "between" is called between two arguments and
+ * "after" is called after all arguments have been handled.
+ */
+struct Method::list_combiner {
+ const std::function<void()> before;
+ const std::function<void()> between;
+ const std::function<void()> after;
};
/* A method that does not require its isl type parameters to be a copy.