summaryrefslogtreecommitdiffstats
path: root/polly/lib/External/isl/cpp
diff options
context:
space:
mode:
authorTobias Grosser <tobias@grosser.es>2018-08-07 05:51:21 +0000
committerTobias Grosser <tobias@grosser.es>2018-08-07 05:51:21 +0000
commit6145b11cd88c22f4a503f8d4ed33d15266cb7a85 (patch)
treedb1bcaaaa563a9b281b0780e7513eaa99fd6153c /polly/lib/External/isl/cpp
parentb8a55e1eeecd0508b8da5ee747a99017513afd4e (diff)
downloadbcm5719-llvm-6145b11cd88c22f4a503f8d4ed33d15266cb7a85.tar.gz
bcm5719-llvm-6145b11cd88c22f4a503f8d4ed33d15266cb7a85.zip
Update isl to isl-0.20-48-g13eba5b5
This is a regular maintenance updated. llvm-svn: 339095
Diffstat (limited to 'polly/lib/External/isl/cpp')
-rw-r--r--polly/lib/External/isl/cpp/cpp.h.pre38
1 files changed, 16 insertions, 22 deletions
diff --git a/polly/lib/External/isl/cpp/cpp.h.pre b/polly/lib/External/isl/cpp/cpp.h.pre
index 0e72c2b064c..bf1fdf80971 100644
--- a/polly/lib/External/isl/cpp/cpp.h.pre
+++ b/polly/lib/External/isl/cpp/cpp.h.pre
@@ -67,9 +67,8 @@ public:
exception(const char *what_arg) {
what_str = std::make_shared<std::string>(what_arg);
}
- static inline exception create(enum isl_error error, const char *msg,
+ static inline void throw_error(enum isl_error error, const char *msg,
const char *file, int line);
- static inline exception create_from_last_error(ctx ctx);
virtual const char *what() const noexcept {
return what_str->c_str();
}
@@ -84,14 +83,9 @@ public:
/* Wrapper for throwing an exception on NULL input.
*/
static void throw_NULL_input(const char *file, int line) {
- throw create(isl_error_invalid, "NULL input", file, line);
- }
- /* Wrapper for throwing an exception corresponding to the last
- * error on "ctx".
- */
- static void throw_last_error(ctx ctx) {
- throw create_from_last_error(ctx);
+ throw_error(isl_error_invalid, "NULL input", file, line);
}
+ static inline void throw_last_error(ctx ctx);
};
/* Create an exception of a type described by "what_arg", with
@@ -153,37 +147,37 @@ class exception_unsupported : public exception {
exception("unsupported operation", msg, file, line) {}
};
-/* Create an exception of the class that corresponds to "error", with
+/* Throw an exception of the class that corresponds to "error", with
* error message "msg" in line "line" of file "file".
*
* isl_error_none is treated as an invalid error type.
*/
-exception exception::create(enum isl_error error, const char *msg,
+void exception::throw_error(enum isl_error error, const char *msg,
const char *file, int line)
{
switch (error) {
case isl_error_none:
break;
- case isl_error_abort: return exception_abort(msg, file, line);
- case isl_error_alloc: return exception_alloc(msg, file, line);
- case isl_error_unknown: return exception_unknown(msg, file, line);
- case isl_error_internal: return exception_internal(msg, file, line);
- case isl_error_invalid: return exception_invalid(msg, file, line);
- case isl_error_quota: return exception_quota(msg, file, line);
+ case isl_error_abort: throw exception_abort(msg, file, line);
+ case isl_error_alloc: throw exception_alloc(msg, file, line);
+ case isl_error_unknown: throw exception_unknown(msg, file, line);
+ case isl_error_internal: throw exception_internal(msg, file, line);
+ case isl_error_invalid: throw exception_invalid(msg, file, line);
+ case isl_error_quota: throw exception_quota(msg, file, line);
case isl_error_unsupported:
- return exception_unsupported(msg, file, line);
+ throw exception_unsupported(msg, file, line);
}
throw exception_invalid("invalid error type", file, line);
}
-/* Create an exception from the last error that occurred on "ctx" and
+/* Throw an exception corresponding to the last error on "ctx" and
* reset the error.
*
* If "ctx" is NULL or if it is not in an error state at the start,
* then an invalid argument exception is thrown.
*/
-exception exception::create_from_last_error(ctx ctx)
+void exception::throw_last_error(ctx ctx)
{
enum isl_error error;
const char *msg, *file;
@@ -195,7 +189,7 @@ exception exception::create_from_last_error(ctx ctx)
line = isl_ctx_last_error_line(ctx.get());
isl_ctx_reset_error(ctx.get());
- return create(error, msg, file, line);
+ throw_error(error, msg, file, line);
}
#else
@@ -217,7 +211,7 @@ public:
fprintf(stderr, "%s:%d: NULL input\n", file, line);
abort();
}
- /* Wrapper for throwing an exception corresponding to the last
+ /* Throw an exception corresponding to the last
* error on "ctx".
* isl should already abort when an error condition occurs,
* so this function should never be called.
OpenPOWER on IntegriCloud