Lazy evaluate arguments of printDebugStrings(...) function

Change-Id: Ie44e109fd9235c5df32fb90b9e6fc6058e558a99
Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
This commit is contained in:
Bartosz Dunajski
2020-09-25 11:24:15 +02:00
committed by sys_ocldev
parent 7d532f4f98
commit 55bd544402
26 changed files with 88 additions and 84 deletions

View File

@@ -146,11 +146,11 @@ cl_int Program::processGenBinary() {
DeviceBinaryFormat singleDeviceBinaryFormat;
std::tie(decodeError, singleDeviceBinaryFormat) = NEO::decodeSingleDeviceBinary(programInfo, binary, decodeErrors, decodeWarnings);
if (decodeWarnings.empty() == false) {
printDebugString(DebugManager.flags.PrintDebugMessages.get(), stderr, "%s\n", decodeWarnings.c_str());
PRINT_DEBUG_STRING(DebugManager.flags.PrintDebugMessages.get(), stderr, "%s\n", decodeWarnings.c_str());
}
if (DecodeError::Success != decodeError) {
printDebugString(DebugManager.flags.PrintDebugMessages.get(), stderr, "%s\n", decodeErrors.c_str());
PRINT_DEBUG_STRING(DebugManager.flags.PrintDebugMessages.get(), stderr, "%s\n", decodeErrors.c_str());
return CL_INVALID_BINARY;
}