aboutsummaryrefslogtreecommitdiff
path: root/gdbsupport/gdb_assert.h
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@polymtl.ca>2023-02-08 15:36:23 -0500
committerSimon Marchi <simon.marchi@polymtl.ca>2023-02-08 15:46:02 -0500
commitc583a2520616c2736cffc389c89a48b159366e6c (patch)
treeb4925f26506fcee96c16119431c01760f05db95d /gdbsupport/gdb_assert.h
parentca7f92c2f15b86b09c4a8ad14806bef666308d31 (diff)
downloadbinutils-users/simark/clang-format.zip
binutils-users/simark/clang-format.tar.gz
binutils-users/simark/clang-format.tar.bz2
Run clang-format.shusers/simark/clang-format
Change-Id: Ia948cc26d534b0dd02702244d52434b1a2093968
Diffstat (limited to 'gdbsupport/gdb_assert.h')
-rw-r--r--gdbsupport/gdb_assert.h17
1 files changed, 9 insertions, 8 deletions
diff --git a/gdbsupport/gdb_assert.h b/gdbsupport/gdb_assert.h
index f399036..e7ef991 100644
--- a/gdbsupport/gdb_assert.h
+++ b/gdbsupport/gdb_assert.h
@@ -31,21 +31,22 @@
existing lower case macro <assert.h>:assert() that it is
replacing. */
-#define gdb_assert(expr) \
- ((void) ((expr) ? 0 : \
- (gdb_assert_fail (#expr, __FILE__, __LINE__, __func__), 0)))
+#define gdb_assert(expr) \
+ ((void) ((expr) \
+ ? 0 \
+ : (gdb_assert_fail (#expr, __FILE__, __LINE__, __func__), 0)))
/* This prints an "Assertion failed" message, asking the user if they
want to continue, dump core, or just exit. */
#define gdb_assert_fail(assertion, file, line, function) \
- internal_error_loc (file, line, _("%s: Assertion `%s' failed."), \
- function, assertion)
+ internal_error_loc (file, line, _ ("%s: Assertion `%s' failed."), function, \
+ assertion)
/* The canonical form of gdb_assert (0).
MESSAGE is a string to include in the error message. */
-#define gdb_assert_not_reached(message, ...) \
- internal_error_loc (__FILE__, __LINE__, _("%s: " message), __func__, \
- ##__VA_ARGS__)
+#define gdb_assert_not_reached(message, ...) \
+ internal_error_loc (__FILE__, __LINE__, _ ("%s: " message), __func__, \
+ ##__VA_ARGS__)
#endif /* COMMON_GDB_ASSERT_H */