SWDEV-307411 - Require comment/message string in guarantee().
Change-Id: I55a699c5366f6a7d167ede4c9be2ec5b15cea9d0
[ROCm/clr commit: 951a5b9e7d]
This commit is contained in:
committed by
Karthik Jayaprakash
parent
bfe5591f69
commit
9bfae25a7c
@@ -94,12 +94,9 @@ extern void log_printf(LogLevel level, const char* file, int line, uint64_t *sta
|
||||
#endif // __INTEL_COMPILER
|
||||
|
||||
//! \brief Abort the program if the invariant \a cond is false.
|
||||
#define guarantee(cond, ...) \
|
||||
#define guarantee(cond, message) \
|
||||
if (!(cond)) { \
|
||||
if(strlen(#__VA_ARGS__) == 0) \
|
||||
amd::report_fatal(__FILE__, __LINE__, XSTR(cond) ); \
|
||||
else \
|
||||
amd::report_fatal(__FILE__, __LINE__, XSTR(__VA_ARGS__) ); \
|
||||
amd::report_fatal(__FILE__, __LINE__, XSTR(message) ); \
|
||||
amd::breakpoint(); \
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user