[Beignet] [PATCH 3/3] llvm3.9 will assert if ouput is empty string.
xionghu.luo at intel.com
xionghu.luo at intel.com
Mon Mar 20 14:34:06 UTC 2017
From: Luo Xionghu <xionghu.luo at intel.com>
Signed-off-by: Luo Xionghu <xionghu.luo at intel.com>
---
backend/src/backend/program.cpp | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/backend/src/backend/program.cpp b/backend/src/backend/program.cpp
index 8a4ad83..8b8abc4 100644
--- a/backend/src/backend/program.cpp
+++ b/backend/src/backend/program.cpp
@@ -1114,8 +1114,10 @@ EXTEND_QUOTE:
stringSize, err, errSize, optLevel, options);
if (err != NULL)
*errSize += clangErrSize;
- if (OCL_OUTPUT_BUILD_LOG && err)
- llvm::errs() << options << "\n" << err;
+ if (OCL_OUTPUT_BUILD_LOG && options)
+ llvm::errs() << "options:" << options << "\n";
+ if (OCL_OUTPUT_BUILD_LOG && err && *errSize)
+ llvm::errs() << err << "\n";
} else
p = NULL;
@@ -1168,8 +1170,10 @@ EXTEND_QUOTE:
p = gbe_program_new_gen_program(deviceID, out_module, NULL, NULL);
- if (OCL_OUTPUT_BUILD_LOG && err)
- llvm::errs() << options << "\n" << err;
+ if (OCL_OUTPUT_BUILD_LOG && options)
+ llvm::errs() << "options:" << options << "\n";
+ if (OCL_OUTPUT_BUILD_LOG && err && *errSize)
+ llvm::errs() << err << "\n";
} else
p = NULL;
releaseLLVMContextLock();
--
2.5.0
More information about the Beignet
mailing list