Skip to content

Commit 93a31cd

Browse files
committed
[nsan] Make #include more conventional
1 parent 44f30c8 commit 93a31cd

File tree

7 files changed

+17
-14
lines changed

7 files changed

+17
-14
lines changed

compiler-rt/lib/nsan/nsan.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@
3030
//
3131
//===----------------------------------------------------------------------===//
3232

33+
#include "nsan.h"
34+
#include "nsan_flags.h"
35+
#include "nsan_stats.h"
36+
#include "nsan_suppressions.h"
37+
3338
#include <assert.h>
3439
#include <math.h>
3540
#include <stdint.h>
@@ -43,11 +48,6 @@
4348
#include "sanitizer_common/sanitizer_stacktrace.h"
4449
#include "sanitizer_common/sanitizer_symbolizer.h"
4550

46-
#include "nsan/nsan.h"
47-
#include "nsan/nsan_flags.h"
48-
#include "nsan/nsan_stats.h"
49-
#include "nsan/nsan_suppressions.h"
50-
5151
using namespace __sanitizer;
5252
using namespace __nsan;
5353

compiler-rt/lib/nsan/nsan.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,8 @@ inline const u8 *GetShadowTypeAddrFor(const u8 *Ptr) {
8686
template <typename FT> struct FTInfo {};
8787
template <> struct FTInfo<float> {
8888
using orig_type = float;
89-
using orig_bits_type = __sanitizer::u32;
90-
using mantissa_bits_type = __sanitizer::u32;
89+
using orig_bits_type = u32;
90+
using mantissa_bits_type = u32;
9191
using shadow_type = double;
9292
static const char *kCppTypeName;
9393
static constexpr unsigned kMantissaBits = 23;
@@ -104,8 +104,8 @@ template <> struct FTInfo<float> {
104104
};
105105
template <> struct FTInfo<double> {
106106
using orig_type = double;
107-
using orig_bits_type = __sanitizer::u64;
108-
using mantissa_bits_type = __sanitizer::u64;
107+
using orig_bits_type = u64;
108+
using mantissa_bits_type = u64;
109109
using shadow_type = __float128;
110110
static const char *kCppTypeName;
111111
static constexpr unsigned kMantissaBits = 52;
@@ -126,7 +126,7 @@ template <> struct FTInfo<double> {
126126
};
127127
template <> struct FTInfo<long double> {
128128
using orig_type = long double;
129-
using mantissa_bits_type = __sanitizer::u64;
129+
using mantissa_bits_type = u64;
130130
using shadow_type = __float128;
131131
static const char *kCppTypeName;
132132
static constexpr unsigned kMantissaBits = 63;

compiler-rt/lib/nsan/nsan_interceptors.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
//===----------------------------------------------------------------------===//
1717

1818
#include "interception/interception.h"
19-
#include "nsan/nsan.h"
19+
#include "nsan.h"
2020
#include "sanitizer_common/sanitizer_common.h"
2121

2222
#include <wchar.h>

compiler-rt/lib/nsan/nsan_malloc_linux.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
//===----------------------------------------------------------------------===//
1212

1313
#include "interception/interception.h"
14-
#include "nsan/nsan.h"
14+
#include "nsan.h"
1515
#include "sanitizer_common/sanitizer_allocator_dlsym.h"
1616
#include "sanitizer_common/sanitizer_common.h"
1717
#include "sanitizer_common/sanitizer_platform.h"

compiler-rt/lib/nsan/nsan_preinit.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
//
1111
//===----------------------------------------------------------------------===//
1212

13-
#include "nsan/nsan.h"
13+
#include "nsan.h"
1414
#include "sanitizer_common/sanitizer_internal_defs.h"
1515

1616
#if SANITIZER_CAN_USE_PREINIT_ARRAY

compiler-rt/lib/nsan/nsan_stats.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
// NumericalStabilitySanitizer statistics.
1212
//===----------------------------------------------------------------------===//
1313

14-
#include "nsan/nsan_stats.h"
14+
#include "nsan_stats.h"
1515

1616
#include "sanitizer_common/sanitizer_common.h"
1717
#include "sanitizer_common/sanitizer_placement_new.h"

compiler-rt/lib/sanitizer_common/sanitizer_internal_defs.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -457,6 +457,9 @@ using namespace __sanitizer;
457457
namespace __msan {
458458
using namespace __sanitizer;
459459
}
460+
namespace __nsan {
461+
using namespace __sanitizer;
462+
}
460463
namespace __hwasan {
461464
using namespace __sanitizer;
462465
}

0 commit comments

Comments
 (0)