[ASan] cmake cleanup: make tab/space padding in CMakeLists consistent, silence/fix some pedantic warnings

llvm-svn: 159514
This commit is contained in:
Alexey Samsonov 2012-07-02 06:48:10 +00:00
parent 1355465227
commit 4618508ea4
3 changed files with 13 additions and 10 deletions

View File

@ -29,10 +29,13 @@ set(ASAN_CFLAGS
-funwind-tables
-fvisibility=hidden
)
if (SUPPORTS_NO_VARIADIC_MACROS_FLAG)
list(APPEND ASAN_CFLAGS -Wno-variadic-macros)
endif ()
set(ASAN_COMMON_DEFINITIONS
ASAN_HAS_EXCEPTIONS=1
ASAN_NEEDS_SEGV=1
ASAN_HAS_EXCEPTIONS=1
ASAN_NEEDS_SEGV=1
)
if(CAN_TARGET_X86_64)
@ -42,11 +45,11 @@ if(CAN_TARGET_X86_64)
$<TARGET_OBJECTS:RTSanitizerCommon.x86_64>
)
set_target_compile_flags(clang_rt.asan-x86_64
${ASAN_CFLAGS}
${ASAN_CFLAGS}
${TARGET_X86_64_CFLAGS}
)
set_property(TARGET clang_rt.asan-x86_64 APPEND PROPERTY COMPILE_DEFINITIONS
${ASAN_COMMON_DEFINITIONS})
set_property(TARGET clang_rt.asan-x86_64 APPEND PROPERTY COMPILE_DEFINITIONS
${ASAN_COMMON_DEFINITIONS})
endif()
if(CAN_TARGET_I386)
add_library(clang_rt.asan-i386 STATIC
@ -55,11 +58,11 @@ if(CAN_TARGET_I386)
$<TARGET_OBJECTS:RTSanitizerCommon.i386>
)
set_target_compile_flags(clang_rt.asan-i386
${ASAN_CFLAGS}
${ASAN_CFLAGS}
${TARGET_I386_CFLAGS}
)
set_property(TARGET clang_rt.asan-x86_64 APPEND PROPERTY COMPILE_DEFINITIONS
${ASAN_COMMON_DEFINITIONS})
set_property(TARGET clang_rt.asan-x86_64 APPEND PROPERTY COMPILE_DEFINITIONS
${ASAN_COMMON_DEFINITIONS})
endif()
if(LLVM_INCLUDE_TESTS)

View File

@ -63,7 +63,7 @@ class AsanThreadRegistry {
// and fills "stats" with zeroes.
void FlushToAccumulatedStatsUnlocked(AsanStats *stats);
static const int kMaxNumberOfThreads = (1 << 22); // 4M
static const u32 kMaxNumberOfThreads = (1 << 22); // 4M
AsanThreadSummary *thread_summaries_[kMaxNumberOfThreads];
AsanThread main_thread_;
AsanThreadSummary main_thread_summary_;

View File

@ -24,7 +24,7 @@ enum memory_order {
memory_order_acquire = 1 << 2,
memory_order_release = 1 << 3,
memory_order_acq_rel = 1 << 4,
memory_order_seq_cst = 1 << 5,
memory_order_seq_cst = 1 << 5
};
struct atomic_uint8_t {