[PATCH] D51171: Fix some Wundef warnings in Compiler.h

Sven van Haastregt via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 4 05:50:29 PDT 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rL341364: Fix some Wundef warnings in Compiler.h (authored by svenvh, committed by ).

Changed prior to commit:
  https://reviews.llvm.org/D51171?vs=162199&id=163790#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D51171

Files:
  llvm/trunk/include/llvm/Support/Compiler.h


Index: llvm/trunk/include/llvm/Support/Compiler.h
===================================================================
--- llvm/trunk/include/llvm/Support/Compiler.h
+++ llvm/trunk/include/llvm/Support/Compiler.h
@@ -519,7 +519,7 @@
 /// reduced default alignment.
 inline void *allocate_buffer(size_t Size, size_t Alignment) {
   return ::operator new(Size
-#if __cpp_aligned_new
+#ifdef __cpp_aligned_new
                         ,
                         std::align_val_t(Alignment)
 #endif
@@ -535,11 +535,11 @@
 /// most likely using the above helper.
 inline void deallocate_buffer(void *Ptr, size_t Size, size_t Alignment) {
   ::operator delete(Ptr
-#if __cpp_sized_deallocation
+#ifdef __cpp_sized_deallocation
                     ,
                     Size
 #endif
-#if __cpp_aligned_new
+#ifdef __cpp_aligned_new
                     ,
                     std::align_val_t(Alignment)
 #endif


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D51171.163790.patch
Type: text/x-patch
Size: 906 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180904/cb9a99b2/attachment.bin>


More information about the llvm-commits mailing list