diff --git a/clang/lib/Headers/__clang_cuda_runtime_wrapper.h b/clang/lib/Headers/__clang_cuda_runtime_wrapper.h --- a/clang/lib/Headers/__clang_cuda_runtime_wrapper.h +++ b/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 +// .. 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