[PATCH] D110781: [CUDA] Make sure <string.h> is included with original __THROW defined.
Artem Belevich via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Oct 6 09:38:04 PDT 2021
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D110781.377573.patch
Type: text/x-patch
Size: 659 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20211006/08ba2a4a/attachment.bin>
More information about the cfe-commits
mailing list