From 1cfcbfef83553a5b8b7c84b8aaa5278989b721a8 Mon Sep 17 00:00:00 2001 From: Qichao Gu Date: Wed, 9 Oct 2024 14:03:14 +0800 Subject: [PATCH] address review comments --- test_common/harness/msvc9.c | 4 ++++ test_conformance/events/test_userevents.cpp | 26 --------------------- 2 files changed, 4 insertions(+), 26 deletions(-) diff --git a/test_common/harness/msvc9.c b/test_common/harness/msvc9.c index 4488479da9..ef70035fb1 100644 --- a/test_common/harness/msvc9.c +++ b/test_common/harness/msvc9.c @@ -714,6 +714,10 @@ int32_t float2int(float fx) return u.i; } +#ifndef __has_builtin +#define __has_builtin(x) 0 +#endif + #if !__has_builtin(__builtin_clz) #if !defined(_WIN64) /** Returns the number of leading 0-bits in x, diff --git a/test_conformance/events/test_userevents.cpp b/test_conformance/events/test_userevents.cpp index a6e76bdb53..b716b5c7b0 100644 --- a/test_conformance/events/test_userevents.cpp +++ b/test_conformance/events/test_userevents.cpp @@ -28,31 +28,6 @@ /////////////////////////////////////////////////////////////////////////////// // CL error checking. -#if defined(_MSC_VER) -#if defined(__INTEL_LLVM_COMPILER) -#define CL_EXIT_ERROR(cmd, ...) \ - { \ - if ((cmd) != CL_SUCCESS) \ - { \ - log_error("CL ERROR: %s %u: ", __FILE__, __LINE__); \ - log_error(__VA_ARGS__); \ - log_error("\n"); \ - return -1; \ - } \ - } -#else -#define CL_EXIT_ERROR(cmd, ...) \ - { \ - if ((cmd) != CL_SUCCESS) \ - { \ - log_error("CL ERROR: %s %u: ", __FILE__, __LINE__); \ - log_error(##__VA_ARGS__); \ - log_error("\n"); \ - return -1; \ - } \ - } -#endif -#else #define CL_EXIT_ERROR(cmd, format, ...) \ { \ if ((cmd) != CL_SUCCESS) \ @@ -63,7 +38,6 @@ return -1; \ } \ } -#endif #define CL_EXIT_BUILD_ERROR(cmd, program, format, ...) \ { \