tra updated this revision to Diff 377587. tra added a comment. re-set __THROW to an empty value. It's still needed for CUDA-7.5
Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D110781/new/ https://reviews.llvm.org/D110781 Files: clang/lib/Headers/__clang_cuda_runtime_wrapper.h Index: clang/lib/Headers/__clang_cuda_runtime_wrapper.h =================================================================== --- clang/lib/Headers/__clang_cuda_runtime_wrapper.h +++ clang/lib/Headers/__clang_cuda_runtime_wrapper.h @@ -208,7 +208,13 @@ // CUDA-9.2 needs host-side memcpy for some host functions in // device_functions.hpp #if CUDA_VERSION >= 9020 +// string.h needs __THROW to match the rest of the system includes. +#pragma pop_macro("__THROW") #include <string.h> +// .. but we still need to undef it in order to include other CUDA headers. +#pragma push_macro("__THROW") +#undef __THROW +#define __THROW #endif #include "crt/math_functions.hpp" #else
Index: clang/lib/Headers/__clang_cuda_runtime_wrapper.h =================================================================== --- clang/lib/Headers/__clang_cuda_runtime_wrapper.h +++ clang/lib/Headers/__clang_cuda_runtime_wrapper.h @@ -208,7 +208,13 @@ // CUDA-9.2 needs host-side memcpy for some host functions in // device_functions.hpp #if CUDA_VERSION >= 9020 +// string.h needs __THROW to match the rest of the system includes. +#pragma pop_macro("__THROW") #include <string.h> +// .. but we still need to undef it in order to include other CUDA headers. +#pragma push_macro("__THROW") +#undef __THROW +#define __THROW #endif #include "crt/math_functions.hpp" #else
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits