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:
parent
d35975adf6
commit
8a8ddcfbed
13
src/debug.h
13
src/debug.h
|
@ -111,12 +111,13 @@ class InternalCompilerError {
|
|||
/// may silently fail in builds where SetInternalCompilerErrorReporter() is not
|
||||
/// called. Only use in places where there's no sensible place to put proper
|
||||
/// error handling.
|
||||
#define TINT_ASSERT(system, condition) \
|
||||
do { \
|
||||
if (!(condition)) { \
|
||||
tint::diag::List diagnostics; \
|
||||
TINT_ICE(system, diagnostics) << "TINT_ASSERT(" << #condition << ")"; \
|
||||
} \
|
||||
#define TINT_ASSERT(system, condition) \
|
||||
do { \
|
||||
if (!(condition)) { \
|
||||
tint::diag::List diagnostics; \
|
||||
TINT_ICE(system, diagnostics) \
|
||||
<< "TINT_ASSERT(" #system ", " #condition ")"; \
|
||||
} \
|
||||
} while (false)
|
||||
|
||||
#endif // SRC_DEBUG_H_
|
||||
|
|
Loading…
Reference in New Issue