debug: Include system in assert string

Change-Id: Id709cef0bfdb7cc1f849a5fb43e9d4f43c28272b
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/57706
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
This commit is contained in:
Ben Clayton 2021-07-14 18:42:02 +00:00 committed by Tint LUCI CQ
parent d35975adf6
commit 8a8ddcfbed
1 changed files with 7 additions and 6 deletions

View File

@ -111,12 +111,13 @@ class InternalCompilerError {
/// may silently fail in builds where SetInternalCompilerErrorReporter() is not /// may silently fail in builds where SetInternalCompilerErrorReporter() is not
/// called. Only use in places where there's no sensible place to put proper /// called. Only use in places where there's no sensible place to put proper
/// error handling. /// error handling.
#define TINT_ASSERT(system, condition) \ #define TINT_ASSERT(system, condition) \
do { \ do { \
if (!(condition)) { \ if (!(condition)) { \
tint::diag::List diagnostics; \ tint::diag::List diagnostics; \
TINT_ICE(system, diagnostics) << "TINT_ASSERT(" << #condition << ")"; \ TINT_ICE(system, diagnostics) \
} \ << "TINT_ASSERT(" #system ", " #condition ")"; \
} \
} while (false) } while (false)
#endif // SRC_DEBUG_H_ #endif // SRC_DEBUG_H_