SWDEV-245381 : Updated guarantee error messages to print based on BUILD_TYPE

Change-Id: Ia21039326b440f6d807a6495a9a05dd52b384c76
This commit is contained in:
agodavar committed 2021-01-05 05:49:09 -05:00
1 parent 7bcd555602
commit 69a786e8d1
5 files changed
+16 -9

No files matched your search

+6 -3
View File
@@ -90,13 +90,16 @@ 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, ...) \
if (!(cond)) { \
amd::report_fatal(__FILE__, __LINE__, "guarantee(" XSTR(cond) ")"); \
if(strlen(#__VA_ARGS__) == 0) \
amd::report_fatal(__FILE__, __LINE__, XSTR(cond) ); \
else \
amd::report_fatal(__FILE__, __LINE__, XSTR(__VA_ARGS__) ); \
amd::breakpoint(); \
}
#define fixme_guarantee(cond) guarantee(cond)
#define fixme_guarantee(cond, ...) guarantee(cond, __VA_ARGS__)
//! \brief Abort the program with a fatal error message.
#define fatal(msg) \