Commit 2b127db9 authored by Yedidya Feldblum's avatar Yedidya Feldblum Committed by Facebook Github Bot

Fix GroupVarint.h includes and preprocessor namespacing

Summary:
[Folly] Fix `GroupVarint.h` includes and preprocessor namespacing.

* Always include everything rather than conditionally including things.
* Namespace as `FOLLY_HAVE_GROUP_VARINT`.

Reviewed By: LeeHowes

Differential Revision: D17780999

fbshipit-source-id: 109fa38794e312e0c5eba0f5bfab56853df59c92
parent a6e73f92
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
#include <folly/container/Array.h> #include <folly/container/Array.h>
#if HAVE_GROUP_VARINT #if FOLLY_HAVE_GROUP_VARINT
namespace folly { namespace folly {
const uint32_t GroupVarint32::kMask[] = { const uint32_t GroupVarint32::kMask[] = {
......
...@@ -21,19 +21,23 @@ ...@@ -21,19 +21,23 @@
#include <glog/logging.h> #include <glog/logging.h>
#include <folly/Portability.h>
#include <folly/Range.h>
#include <folly/detail/GroupVarintDetail.h>
#include <folly/lang/Bits.h>
#include <folly/portability/Builtins.h>
#if !defined(__GNUC__) && !defined(_MSC_VER) #if !defined(__GNUC__) && !defined(_MSC_VER)
#error GroupVarint.h requires GCC or MSVC #error GroupVarint.h requires GCC or MSVC
#endif #endif
#include <folly/Portability.h>
#if FOLLY_X64 || defined(__i386__) || FOLLY_PPC64 || FOLLY_AARCH64 #if FOLLY_X64 || defined(__i386__) || FOLLY_PPC64 || FOLLY_AARCH64
#define HAVE_GROUP_VARINT 1 #define FOLLY_HAVE_GROUP_VARINT 1
#else
#define FOLLY_HAVE_GROUP_VARINT 1
#endif
#include <folly/Range.h> #if FOLLY_HAVE_GROUP_VARINT
#include <folly/detail/GroupVarintDetail.h>
#include <folly/lang/Bits.h>
#include <folly/portability/Builtins.h>
#if FOLLY_SSE >= 3 #if FOLLY_SSE >= 3
#include <nmmintrin.h> #include <nmmintrin.h>
...@@ -661,4 +665,4 @@ typedef GroupVarintDecoder<uint64_t> GroupVarint64Decoder; ...@@ -661,4 +665,4 @@ typedef GroupVarintDecoder<uint64_t> GroupVarint64Decoder;
} // namespace folly } // namespace folly
#endif /* FOLLY_X64 || defined(__i386__) || FOLLY_PPC64 */ #endif // FOLLY_HAVE_GROUP_VARINT
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
#include <cstdarg> #include <cstdarg>
// On platforms where it's not supported, GroupVarint will be compiled out. // On platforms where it's not supported, GroupVarint will be compiled out.
#if HAVE_GROUP_VARINT #if FOLLY_HAVE_GROUP_VARINT
#include <folly/portability/GTest.h> #include <folly/portability/GTest.h>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment