Skip to content

Commit c72a679

Browse files
WizKidfacebook-github-bot
authored andcommitted
Include file that define assertx
Summary: - Make sure to include headers for macros - Have X-inl.h files require to be only included from X.h Reviewed By: mdko Differential Revision: D73640689 fbshipit-source-id: a134d1c088645b2c81674a5e9815eac80901d69b
1 parent c7532b8 commit c72a679

16 files changed

+47
-2
lines changed

hphp/runtime/base/hash-table-inl.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@
1414
+----------------------------------------------------------------------+
1515
*/
1616

17+
#ifndef incl_HPHP_HASH_TABLE_INL_H_
18+
#error "hash-table-inl.h should only be included by hash-table.h"
19+
#endif
20+
21+
#include "hphp/util/assertions.h"
1722
#include "hphp/util/configs/server.h"
1823
#include "hphp/util/portability.h"
1924

hphp/runtime/base/hash-table.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -522,4 +522,6 @@ struct HashTable : HashTableCommon {
522522
} // namespace array
523523
} // namespace HPHP
524524

525+
#define incl_HPHP_HASH_TABLE_INL_H_
525526
#include "hphp/runtime/base/hash-table-inl.h"
527+
#undef incl_HPHP_HASH_TABLE_INL_H_

hphp/runtime/base/memory-manager-inl.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,17 @@
1414
+----------------------------------------------------------------------+
1515
*/
1616

17-
#pragma once
17+
#ifndef incl_HPHP_MEMORY_MANAGER_INL_H_
18+
#error "memory-manager-inl.h should only be included by memory-manager.h"
19+
#endif
1820

1921
#include <limits>
2022
#include <utility>
2123

24+
#include "hphp/util/assertions.h"
2225
#include "hphp/util/bitops.h"
2326
#include "hphp/util/compilation-flags.h"
27+
#include "hphp/util/trace.h"
2428

2529
namespace HPHP {
2630

hphp/runtime/base/memory-manager.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1136,4 +1136,6 @@ void reset_alloc_sampling();
11361136

11371137
}
11381138

1139+
#define incl_HPHP_MEMORY_MANAGER_INL_H_
11391140
#include "hphp/runtime/base/memory-manager-inl.h"
1141+
#undef incl_HPHP_MEMORY_MANAGER_INL_H_

hphp/runtime/ext/asio/asio-context-enter-inl.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
#error "This should only be included by asio-context-enter.h"
2020
#endif
2121

22+
#include <folly/Likely.h>
23+
2224
namespace HPHP::asio {
2325
///////////////////////////////////////////////////////////////////////////////
2426

hphp/runtime/ext/asio/ext_async-function-wait-handle-inl.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
#error "This should only be included by ext_async-function-wait-handle.h"
2020
#endif
2121

22+
#include "hphp/util/assertions.h"
23+
2224
namespace HPHP {
2325
///////////////////////////////////////////////////////////////////////////////
2426

hphp/runtime/ext/hsl/replace_every_nonrecursive.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
+----------------------------------------------------------------------+
1717
*/
1818

19+
#include "hphp/util/assertions.h"
1920

2021
namespace HPHP {
2122

hphp/runtime/vm/act-rec-inl.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,15 @@
1414
+----------------------------------------------------------------------+
1515
*/
1616

17+
#ifndef incl_HPHP_VM_ACT_REC_INL_H_
18+
#error "act-rec-inl.h should only be included by act-rec.h"
19+
#endif
20+
21+
#include "hphp/util/assertions.h"
1722
#include "hphp/util/compilation-flags.h"
1823

24+
#include <folly/Likely.h>
25+
1926
namespace HPHP {
2027

2128
///////////////////////////////////////////////////////////////////////////////

hphp/runtime/vm/act-rec.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,5 +294,6 @@ bool isCallToExit(uint64_t address);
294294

295295
}
296296

297+
#define incl_HPHP_VM_ACT_REC_INL_H_
297298
#include "hphp/runtime/vm/act-rec-inl.h"
298-
299+
#undef incl_HPHP_VM_ACT_REC_INL_H_

hphp/runtime/vm/func-emitter-inl.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@
1818
#error "func-emitter-inl.h should only be included by func-emitter.h"
1919
#endif
2020

21+
#include "hphp/util/assertions.h"
22+
23+
#include <folly/Likely.h>
24+
2125
namespace HPHP {
2226
///////////////////////////////////////////////////////////////////////////////
2327

0 commit comments

Comments
 (0)