aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/rust/rust-diagnostics.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/rust/rust-diagnostics.h b/gcc/rust/rust-diagnostics.h
index f7a3856..93bd1b3 100644
--- a/gcc/rust/rust-diagnostics.h
+++ b/gcc/rust/rust-diagnostics.h
@@ -142,6 +142,11 @@ struct Error
// rust_debug uses normal printf formatting, not GCC diagnostic formatting.
#define rust_debug(...) rust_debug_loc (Location (), __VA_ARGS__)
+// rust_sorry_at wraps GCC diagnostic "sorry_at" to accept "Location" instead of
+// "location_t"
+#define rust_sorry_at(location, ...) \
+ sorry_at (location.gcc_location (), __VA_ARGS__)
+
void
rust_debug_loc (const Location location, const char *fmt,
...) ATTRIBUTE_PRINTF_2;