r285250 - [CUDA] Switch cuda_wrappers/complex to use a proper include guard instead of #pragma once.

Justin Lebar via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 26 15:13:20 PDT 2016


Author: jlebar
Date: Wed Oct 26 17:13:20 2016
New Revision: 285250

URL: http://llvm.org/viewvc/llvm-project?rev=285250&view=rev
Log:
[CUDA] Switch cuda_wrappers/complex to use a proper include guard instead of #pragma once.

This is consistent with the rest of our internal headers.

Modified:
    cfe/trunk/lib/Headers/cuda_wrappers/complex

Modified: cfe/trunk/lib/Headers/cuda_wrappers/complex
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Headers/cuda_wrappers/complex?rev=285250&r1=285249&r2=285250&view=diff
==============================================================================
--- cfe/trunk/lib/Headers/cuda_wrappers/complex (original)
+++ cfe/trunk/lib/Headers/cuda_wrappers/complex Wed Oct 26 17:13:20 2016
@@ -21,7 +21,8 @@
  *===-----------------------------------------------------------------------===
  */
 
-#pragma once
+#ifndef __CLANG_CUDA_WRAPPERS_COMPLEX
+#define __CLANG_CUDA_WRAPPERS_COMPLEX
 
 // Wrapper around <complex> that forces its functions to be __host__
 // __device__.
@@ -77,3 +78,5 @@
 #pragma pop_macro("_GLIBCXX_USE_C99_COMPLEX")
 
 #pragma clang force_cuda_host_device end
+
+#endif // include guard




More information about the cfe-commits mailing list