Remove now-useless FOLLY_MALLOC_H_
authorNicholas Ormrod <njormrod@fb.com>
Fri, 26 Aug 2016 18:41:38 +0000 (11:41 -0700)
committerFacebook Github Bot 4 <facebook-github-bot-4-bot@fb.com>
Fri, 26 Aug 2016 18:53:35 +0000 (11:53 -0700)
Summary:
Malloc.h is intentionally included multiple times, once from folly and once from libstdc++. The current ###pragma once## implicitly allows this to happen. FBString.h has an undef for Malloc.h's include guard, which originally accomplished this goal.

The undefing code is presently moot, since its functionality has been replaced by ###pragma once##. Remove it.

I noticed this when ott was copying FBString over to libstdc++ in D3757853.
The diff that switched the include guards to pragmas was a codemod, and was not specific to fbstring. D3054492

Reviewed By: ot

Differential Revision: D3758119

fbshipit-source-id: e796d039a031d5f842ed39bf55a6b1aeb2686bc4

folly/FBString.h
folly/Malloc.h

index bc5790ae43155ee3644eaa4361ddbbcaa37d541e..d02d12e2d25bca83f4d38a37b0ed23ae09894fb7 100644 (file)
 #define FOLLY_DEFINED_NDEBUG_FOR_FBSTRING
 #endif // NDEBUG
 
-// Handle the cases where the fbcode version (folly/Malloc.h) is included
-// either before or after this inclusion.
-#ifdef FOLLY_MALLOC_H_
-#undef FOLLY_MALLOC_H_
-#include "basic_fbstring_malloc.h" // nolint
-#else
-#include "basic_fbstring_malloc.h" // nolint
-#undef FOLLY_MALLOC_H_
-#endif
+#include "basic_fbstring_malloc.h"
 
 #else // !_LIBSTDCXX_FBSTRING
 
index fec188f5b9c3f248a293dee12a70eac8764a74cc..8092ab0b197772df2397bad9c514541ab49fe8f5 100644 (file)
@@ -18,7 +18,6 @@
 // http://www.canonware.com/download/jemalloc/jemalloc-latest/doc/jemalloc.html
 
 #pragma once
-#define FOLLY_MALLOC_H_
 
 /**
  * Define various MALLOCX_* macros normally provided by jemalloc.  We define