Switch unguarded #pragmas to use portability macros
[folly.git] / folly / gen / Base-inl.h
index 959696e8068407e93ad675b378e240d08d19b1fc..716f5aceb37368d36b37c5c7538f85fe3b4fdae6 100644 (file)
 #error This file may only be included from folly/gen/Base.h
 #endif
 
+#include <folly/Portability.h>
+
 // Ignore shadowing warnings within this file, so includers can use -Wshadow.
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wshadow"
+FOLLY_PUSH_WARNING
+FOLLY_GCC_DISABLE_WARNING("-Wshadow")
 
 namespace folly {
 namespace gen {
@@ -2340,4 +2342,4 @@ inline detail::Batch batch(size_t batchSize) {
 } // gen
 } // folly
 
-#pragma GCC diagnostic pop
+FOLLY_POP_WARNING