tra updated this revision to Diff 377573. tra edited the summary of this revision. tra added a comment.
Added a missing push_macro 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,12 @@ // 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 #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,12 @@ // 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 #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