From e892dc54738ff07c2827775a208767b2018a6b13 Mon Sep 17 00:00:00 2001 From: Nicholas Ormrod Date: Thu, 21 Aug 2014 12:44:48 -0700 Subject: [PATCH] Fix #includes Summary: A few of folly's includes do not start with folly/, and so were missed by D1411225's include-quotation ##""## -> ##<>## transformation change. There were also some folly includes in deeper folly directories and the docs, which I also fixed. The search ##egrep "# *include *\"" -R folly/*## now only includes two lines in FBString.h, which are included for libgcc purposes. The wangle/test/Thens.cpp file, which is auto-generated, was special. I changed the generator .rb script, but when I ran it I overwrote some manual changes to Thens.cpp. For simplicity, I have manually applied the change to Thens.cpp as well. Test Plan: fbconfig -r folly && fbmake runtests Reviewed By: hannesr@fb.com Subscribers: sdwilsh, fugalh FB internal diff: D1511712 --- folly/AtomicHashArray.h | 2 +- folly/AtomicHashMap.h | 2 +- folly/Benchmark.cpp | 8 ++++---- folly/IPAddress.cpp | 2 +- folly/IPAddressV4.cpp | 2 +- folly/IPAddressV6.cpp | 2 +- folly/LifoSem.cpp | 2 +- folly/MacAddress.cpp | 2 +- folly/Portability.h | 4 ++-- folly/ThreadName.h | 2 +- folly/detail/MemoryIdler.cpp | 2 +- folly/detail/MemoryIdler.h | 2 +- folly/docs/Benchmark.md | 12 ++++++------ folly/docs/Overview.md | 2 +- folly/small_vector.h | 4 ++-- folly/test/DeterministicSchedule.cpp | 2 +- folly/test/DeterministicScheduleTest.cpp | 2 +- folly/test/IPAddressTest.cpp | 2 +- folly/wangle/Future-inl.h | 2 +- folly/wangle/Future.h | 6 +++--- folly/wangle/GenericThreadGate.h | 4 ++-- folly/wangle/Later.h | 2 +- folly/wangle/ManualExecutor.cpp | 2 +- folly/wangle/OpaqueCallbackShunt.h | 2 +- folly/wangle/Promise-inl.h | 4 ++-- folly/wangle/Promise.h | 6 +++--- folly/wangle/QueuedImmediateExecutor.cpp | 2 +- folly/wangle/ThreadGate.cpp | 2 +- folly/wangle/ThreadGate.h | 2 +- folly/wangle/Try-inl.h | 2 +- folly/wangle/Try.h | 2 +- folly/wangle/test/Thens.cpp | 2 +- folly/wangle/test/thens.rb | 2 +- 33 files changed, 49 insertions(+), 49 deletions(-) diff --git a/folly/AtomicHashArray.h b/folly/AtomicHashArray.h index 043909c0..18e883a4 100644 --- a/folly/AtomicHashArray.h +++ b/folly/AtomicHashArray.h @@ -296,6 +296,6 @@ class AtomicHashArray : boost::noncopyable { } // namespace folly -#include "AtomicHashArray-inl.h" +#include #endif // FOLLY_ATOMICHASHARRAY_H_ diff --git a/folly/AtomicHashMap.h b/folly/AtomicHashMap.h index 21c52f0e..f1fd787a 100644 --- a/folly/AtomicHashMap.h +++ b/folly/AtomicHashMap.h @@ -410,6 +410,6 @@ class AtomicHashMap : boost::noncopyable { } // namespace folly -#include "AtomicHashMap-inl.h" +#include #endif // FOLLY_ATOMICHASHMAP_H_ diff --git a/folly/Benchmark.cpp b/folly/Benchmark.cpp index 62599708..940fe91c 100644 --- a/folly/Benchmark.cpp +++ b/folly/Benchmark.cpp @@ -16,10 +16,10 @@ // @author Andrei Alexandrescu (andrei.alexandrescu@fb.com) -#include "Benchmark.h" -#include "Foreach.h" -#include "json.h" -#include "String.h" +#include +#include +#include +#include #include #include diff --git a/folly/IPAddress.cpp b/folly/IPAddress.cpp index e59caf3b..0a92d3cb 100644 --- a/folly/IPAddress.cpp +++ b/folly/IPAddress.cpp @@ -14,7 +14,7 @@ * limitations under the License. */ -#include "IPAddress.h" +#include #include #include diff --git a/folly/IPAddressV4.cpp b/folly/IPAddressV4.cpp index ae403eb4..144e4cce 100644 --- a/folly/IPAddressV4.cpp +++ b/folly/IPAddressV4.cpp @@ -14,7 +14,7 @@ * limitations under the License. */ -#include "IPAddressV4.h" +#include #include #include diff --git a/folly/IPAddressV6.cpp b/folly/IPAddressV6.cpp index 849c6d63..ea07bb8d 100644 --- a/folly/IPAddressV6.cpp +++ b/folly/IPAddressV6.cpp @@ -14,7 +14,7 @@ * limitations under the License. */ -#include "IPAddressV6.h" +#include #include #include diff --git a/folly/LifoSem.cpp b/folly/LifoSem.cpp index 942f3ffa..dd9f3f8d 100644 --- a/folly/LifoSem.cpp +++ b/folly/LifoSem.cpp @@ -14,7 +14,7 @@ * limitations under the License. */ -#include "LifoSem.h" +#include /// Raw node storage is preallocated in a contiguous memory segment, /// but we use an anonymous mmap so the physical memory used (RSS) will diff --git a/folly/MacAddress.cpp b/folly/MacAddress.cpp index b8aa1afe..1764058e 100644 --- a/folly/MacAddress.cpp +++ b/folly/MacAddress.cpp @@ -14,7 +14,7 @@ * limitations under the License. */ -#include "MacAddress.h" +#include #include #include diff --git a/folly/Portability.h b/folly/Portability.h index 6ce3d51d..4cfec56c 100644 --- a/folly/Portability.h +++ b/folly/Portability.h @@ -18,7 +18,7 @@ #define FOLLY_PORTABILITY_H_ #ifndef FOLLY_NO_CONFIG -#include "folly-config.h" +#include #endif #ifdef FOLLY_PLATFORM_CONFIG @@ -29,7 +29,7 @@ #include #endif -#include "CPortability.h" +#include #if FOLLY_HAVE_SCHED_H #include diff --git a/folly/ThreadName.h b/folly/ThreadName.h index 2d30efa0..dbcdc84e 100644 --- a/folly/ThreadName.h +++ b/folly/ThreadName.h @@ -17,7 +17,7 @@ #pragma once #include -#include "Range.h" +#include namespace folly { diff --git a/folly/detail/MemoryIdler.cpp b/folly/detail/MemoryIdler.cpp index fdda4ca9..de585f2d 100644 --- a/folly/detail/MemoryIdler.cpp +++ b/folly/detail/MemoryIdler.cpp @@ -14,7 +14,7 @@ * limitations under the License. */ -#include "MemoryIdler.h" +#include #include #include #include diff --git a/folly/detail/MemoryIdler.h b/folly/detail/MemoryIdler.h index 5898b07f..28d3c196 100644 --- a/folly/detail/MemoryIdler.h +++ b/folly/detail/MemoryIdler.h @@ -22,7 +22,7 @@ #include #include #include -#include "Futex.h" +#include namespace folly { diff --git a/folly/docs/Benchmark.md b/folly/docs/Benchmark.md index c1be39fb..2d5c4949 100644 --- a/folly/docs/Benchmark.md +++ b/folly/docs/Benchmark.md @@ -16,8 +16,8 @@ build (either directly or packaged with a library). Using `folly/Benchmark.h` is very simple. Here's an example: ``` Cpp - #include "folly/Benchmark.h" - #include "folly/Foreach.h" + #include + #include #include using namespace std; using namespace folly; @@ -70,8 +70,8 @@ passed by the framework down to the function. The type of the count is implicitly `unsigned`. Consider a slightly reworked example: ``` Cpp - #include "folly/Benchmark.h" - #include "folly/Foreach.h" + #include + #include #include using namespace std; using namespace folly; @@ -126,8 +126,8 @@ front insertion for a vector as a baseline and see how back insertion compares with it: ``` Cpp - #include "folly/Benchmark.h" - #include "folly/Foreach.h" + #include + #include #include using namespace std; using namespace folly; diff --git a/folly/docs/Overview.md b/folly/docs/Overview.md index db12cf3c..5cbf3e78 100644 --- a/folly/docs/Overview.md +++ b/folly/docs/Overview.md @@ -33,7 +33,7 @@ At the top level Folly uses the classic "stuttering" scheme `folly/folly` used by Boost and others. The first directory serves as an installation root of the library (with possible versioning a la `folly-1.0/`), and the second is to distinguish the library when -including files, e.g. `#include "folly/FBString.h"`. +including files, e.g. `#include `. The directory structure is flat (mimicking the namespace structure), i.e. we don't have an elaborate directory hierarchy (it is possible diff --git a/folly/small_vector.h b/folly/small_vector.h index 1a8c542b..92a5a2fc 100644 --- a/folly/small_vector.h +++ b/folly/small_vector.h @@ -23,7 +23,7 @@ #ifndef FOLLY_SMALL_VECTOR_H_ #define FOLLY_SMALL_VECTOR_H_ -#include "Portability.h" +#include #include #include @@ -49,7 +49,7 @@ #include #if defined(__GNUC__) && FOLLY_X64 -# include "folly/SmallLocks.h" +# include # define FB_PACK_ATTR FOLLY_PACK_ATTR # define FB_PACK_PUSH FOLLY_PACK_PUSH # define FB_PACK_POP FOLLY_PACK_POP diff --git a/folly/test/DeterministicSchedule.cpp b/folly/test/DeterministicSchedule.cpp index f4c355e0..8a3b1fc1 100644 --- a/folly/test/DeterministicSchedule.cpp +++ b/folly/test/DeterministicSchedule.cpp @@ -14,7 +14,7 @@ * limitations under the License. */ -#include "DeterministicSchedule.h" +#include #include #include #include diff --git a/folly/test/DeterministicScheduleTest.cpp b/folly/test/DeterministicScheduleTest.cpp index 6ec429fb..2d364310 100644 --- a/folly/test/DeterministicScheduleTest.cpp +++ b/folly/test/DeterministicScheduleTest.cpp @@ -14,7 +14,7 @@ * limitations under the License. */ -#include "DeterministicSchedule.h" +#include #include #include diff --git a/folly/test/IPAddressTest.cpp b/folly/test/IPAddressTest.cpp index bdda3663..7b7be995 100644 --- a/folly/test/IPAddressTest.cpp +++ b/folly/test/IPAddressTest.cpp @@ -14,7 +14,7 @@ * limitations under the License. */ -#include "IPAddressTest.h" +#include #include diff --git a/folly/wangle/Future-inl.h b/folly/wangle/Future-inl.h index 3783126e..782afe4b 100644 --- a/folly/wangle/Future-inl.h +++ b/folly/wangle/Future-inl.h @@ -16,7 +16,7 @@ #pragma once -#include "detail/State.h" +#include #include namespace folly { namespace wangle { diff --git a/folly/wangle/Future.h b/folly/wangle/Future.h index 0e99bb6a..e8ac8121 100644 --- a/folly/wangle/Future.h +++ b/folly/wangle/Future.h @@ -24,8 +24,8 @@ #include #include -#include "Promise.h" -#include "Try.h" +#include +#include namespace folly { namespace wangle { @@ -339,4 +339,4 @@ Future waitWithSemaphore(Future&& f, Duration timeout); }} // folly::wangle -#include "Future-inl.h" +#include diff --git a/folly/wangle/GenericThreadGate.h b/folly/wangle/GenericThreadGate.h index 9ffbb202..53886920 100644 --- a/folly/wangle/GenericThreadGate.h +++ b/folly/wangle/GenericThreadGate.h @@ -15,8 +15,8 @@ */ #pragma once -#include "ThreadGate.h" -#include "Executor.h" +#include +#include #include namespace folly { namespace wangle { diff --git a/folly/wangle/Later.h b/folly/wangle/Later.h index 4680aa8d..edde49d0 100644 --- a/folly/wangle/Later.h +++ b/folly/wangle/Later.h @@ -208,4 +208,4 @@ class Later { }} -#include "Later-inl.h" +#include diff --git a/folly/wangle/ManualExecutor.cpp b/folly/wangle/ManualExecutor.cpp index 2c081301..560475cc 100644 --- a/folly/wangle/ManualExecutor.cpp +++ b/folly/wangle/ManualExecutor.cpp @@ -14,7 +14,7 @@ * limitations under the License. */ -#include "ManualExecutor.h" +#include #include #include diff --git a/folly/wangle/OpaqueCallbackShunt.h b/folly/wangle/OpaqueCallbackShunt.h index 296cdea1..a5aebf8e 100644 --- a/folly/wangle/OpaqueCallbackShunt.h +++ b/folly/wangle/OpaqueCallbackShunt.h @@ -16,7 +16,7 @@ #pragma once -#include "Promise.h" +#include namespace folly { namespace wangle { diff --git a/folly/wangle/Promise-inl.h b/folly/wangle/Promise-inl.h index e5027963..04cc9a3f 100644 --- a/folly/wangle/Promise-inl.h +++ b/folly/wangle/Promise-inl.h @@ -19,8 +19,8 @@ #include #include -#include "WangleException.h" -#include "detail/State.h" +#include +#include namespace folly { namespace wangle { diff --git a/folly/wangle/Promise.h b/folly/wangle/Promise.h index 62e6f6d8..e14350e3 100644 --- a/folly/wangle/Promise.h +++ b/folly/wangle/Promise.h @@ -16,8 +16,8 @@ #pragma once -#include "Try.h" -#include "Future.h" +#include +#include namespace folly { namespace wangle { @@ -91,4 +91,4 @@ private: }} -#include "Promise-inl.h" +#include diff --git a/folly/wangle/QueuedImmediateExecutor.cpp b/folly/wangle/QueuedImmediateExecutor.cpp index 05a3b891..469d0296 100644 --- a/folly/wangle/QueuedImmediateExecutor.cpp +++ b/folly/wangle/QueuedImmediateExecutor.cpp @@ -14,7 +14,7 @@ * limitations under the License. */ -#include "QueuedImmediateExecutor.h" +#include #include #include diff --git a/folly/wangle/ThreadGate.cpp b/folly/wangle/ThreadGate.cpp index e27142db..6a210da2 100644 --- a/folly/wangle/ThreadGate.cpp +++ b/folly/wangle/ThreadGate.cpp @@ -14,7 +14,7 @@ * limitations under the License. */ -#include "ThreadGate.h" +#include #include namespace folly { namespace wangle { diff --git a/folly/wangle/ThreadGate.h b/folly/wangle/ThreadGate.h index d7b5124d..bed9d9aa 100644 --- a/folly/wangle/ThreadGate.h +++ b/folly/wangle/ThreadGate.h @@ -16,7 +16,7 @@ #pragma once #include -#include "Future.h" +#include namespace folly { namespace wangle { diff --git a/folly/wangle/Try-inl.h b/folly/wangle/Try-inl.h index bb3257d6..935f54bc 100644 --- a/folly/wangle/Try-inl.h +++ b/folly/wangle/Try-inl.h @@ -18,7 +18,7 @@ #include -#include "WangleException.h" +#include namespace folly { namespace wangle { diff --git a/folly/wangle/Try.h b/folly/wangle/Try.h index d61b4c13..d13fffb5 100644 --- a/folly/wangle/Try.h +++ b/folly/wangle/Try.h @@ -121,4 +121,4 @@ makeTryFunction(F&& f); }} -#include "Try-inl.h" +#include diff --git a/folly/wangle/test/Thens.cpp b/folly/wangle/test/Thens.cpp index e7339221..268d36b2 100644 --- a/folly/wangle/test/Thens.cpp +++ b/folly/wangle/test/Thens.cpp @@ -1,6 +1,6 @@ // This file is @generated by thens.rb -#include "Thens.h" +#include #ifndef __clang__ // TODO: fails to compile with clang:dev. See task #4412111 diff --git a/folly/wangle/test/thens.rb b/folly/wangle/test/thens.rb index 2f073530..942096c3 100755 --- a/folly/wangle/test/thens.rb +++ b/folly/wangle/test/thens.rb @@ -61,7 +61,7 @@ tests = ( print < TEST(Future, thenVariants) { SomeClass anObject; -- 2.34.1