isl_ctx *getCtx() const { return Traits::get_ctx(Obj); }
std::string toStr() const { return Traits::to_str(Obj); }
+
+ /// Print a string representation of this ISL object to stderr.
+ ///
+ /// This function is meant to be called from a debugger and therefore must
+ /// not be declared inline: The debugger needs a valid function pointer to
+ /// call, even if the method is not used.
+ ///
+ /// Note that the string representation of isl_*_dump is different than the
+ /// one for isl_printer/isl_*_to_str().
+ void dump() const;
};
template <typename T> static IslPtr<T> give(__isl_take T *Obj) {
isl_ctx *getCtx() const { return Traits::get_ctx(Obj); }
std::string toStr() const { return Traits::to_str(Obj); }
+
+ /// Print a string representation of this ISL object to stderr.
+ ///
+ /// @see IslPtr<T>::dump()
+ void dump() const;
};
template <typename T>
return getIslCompatibleName(Prefix, ValStr, Suffix);
}
+#define DEFINE_ISLPTR(TYPE) \
+ template <> void polly::IslPtr<isl_##TYPE>::dump() const { \
+ isl_##TYPE##_dump(Obj); \
+ } \
+ template <> void polly::NonowningIslPtr<isl_##TYPE>::dump() const { \
+ isl_##TYPE##_dump(Obj); \
+ }
+
+DEFINE_ISLPTR(val)
+DEFINE_ISLPTR(space)
+DEFINE_ISLPTR(basic_map)
+DEFINE_ISLPTR(map)
+DEFINE_ISLPTR(union_map)
+DEFINE_ISLPTR(basic_set)
+DEFINE_ISLPTR(set)
+DEFINE_ISLPTR(union_set)
+DEFINE_ISLPTR(aff)
+DEFINE_ISLPTR(pw_aff)
+// DEFINE_ISLPTR(union_pw_aff) /* There is no isl_union_pw_aff_dump() */
+DEFINE_ISLPTR(multi_union_pw_aff)
+DEFINE_ISLPTR(union_pw_multi_aff)
+
void polly::foreachElt(NonowningIslPtr<isl_union_map> UMap,
const std::function<void(IslPtr<isl_map> Map)> &F) {
isl_union_map_foreach_map(