[llvm-commits] [compiler-rt] r164821 - in /compiler-rt/trunk/lib/asan/tests: asan_benchmarks_test.cc asan_noinst_test.cc asan_test.cc asan_test_config.h asan_test_utils.h

Alexey Samsonov samsonov at google.com
Fri Sep 28 05:24:24 PDT 2012


Author: samsonov
Date: Fri Sep 28 07:24:23 2012
New Revision: 164821

URL: http://llvm.org/viewvc/llvm-project?rev=164821&view=rev
Log:
[ASan] Fix unit test headers. Add an option to change substitute asan_test_config.h file

Modified:
    compiler-rt/trunk/lib/asan/tests/asan_benchmarks_test.cc
    compiler-rt/trunk/lib/asan/tests/asan_noinst_test.cc
    compiler-rt/trunk/lib/asan/tests/asan_test.cc
    compiler-rt/trunk/lib/asan/tests/asan_test_config.h
    compiler-rt/trunk/lib/asan/tests/asan_test_utils.h

Modified: compiler-rt/trunk/lib/asan/tests/asan_benchmarks_test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/tests/asan_benchmarks_test.cc?rev=164821&r1=164820&r2=164821&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/tests/asan_benchmarks_test.cc (original)
+++ compiler-rt/trunk/lib/asan/tests/asan_benchmarks_test.cc Fri Sep 28 07:24:23 2012
@@ -12,7 +12,6 @@
 // Some benchmarks for the instrumented code.
 //===----------------------------------------------------------------------===//
 
-#include "asan_test_config.h"
 #include "asan_test_utils.h"
 
 template<class T>

Modified: compiler-rt/trunk/lib/asan/tests/asan_noinst_test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/tests/asan_noinst_test.cc?rev=164821&r1=164820&r2=164821&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/tests/asan_noinst_test.cc (original)
+++ compiler-rt/trunk/lib/asan/tests/asan_noinst_test.cc Fri Sep 28 07:24:23 2012
@@ -1,4 +1,4 @@
-//===-- asan_noinst_test.cc ----------------------===//
+//===-- asan_noinst_test.cc -----------------------------------------------===//
 //
 //                     The LLVM Compiler Infrastructure
 //
@@ -17,7 +17,6 @@
 #include "asan_mapping.h"
 #include "asan_stack.h"
 #include "asan_test_utils.h"
-#include "asan_test_config.h"
 #include "sanitizer/asan_interface.h"
 
 #include <assert.h>
@@ -26,7 +25,6 @@
 #include <string.h>  // for memset()
 #include <algorithm>
 #include <vector>
-#include "gtest/gtest.h"
 
 // Simple stand-alone pseudorandom number generator.
 // Current algorithm is ANSI C linear congruential PRNG.

Modified: compiler-rt/trunk/lib/asan/tests/asan_test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/tests/asan_test.cc?rev=164821&r1=164820&r2=164821&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/tests/asan_test.cc (original)
+++ compiler-rt/trunk/lib/asan/tests/asan_test.cc Fri Sep 28 07:24:23 2012
@@ -24,7 +24,6 @@
 #include <emmintrin.h>
 #endif
 
-#include "asan_test_config.h"
 #include "asan_test_utils.h"
 
 #ifndef __APPLE__

Modified: compiler-rt/trunk/lib/asan/tests/asan_test_config.h
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/tests/asan_test_config.h?rev=164821&r1=164820&r2=164821&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/tests/asan_test_config.h (original)
+++ compiler-rt/trunk/lib/asan/tests/asan_test_config.h Fri Sep 28 07:24:23 2012
@@ -1,4 +1,4 @@
-//===-- asan_test_config.h ------------*- C++ -*-===//
+//===-- asan_test_config.h --------------------------------------*- C++ -*-===//
 //
 //                     The LLVM Compiler Infrastructure
 //
@@ -10,6 +10,10 @@
 // This file is a part of AddressSanitizer, an address sanity checker.
 //
 //===----------------------------------------------------------------------===//
+#if !defined(INCLUDED_FROM_ASAN_TEST_UTILS_H)
+# error "This file should be included into asan_test_utils.h only"
+#endif
+
 #ifndef ASAN_TEST_CONFIG_H
 #define ASAN_TEST_CONFIG_H
 

Modified: compiler-rt/trunk/lib/asan/tests/asan_test_utils.h
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/tests/asan_test_utils.h?rev=164821&r1=164820&r2=164821&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/tests/asan_test_utils.h (original)
+++ compiler-rt/trunk/lib/asan/tests/asan_test_utils.h Fri Sep 28 07:24:23 2012
@@ -1,4 +1,4 @@
-//===-- asan_test_utils.h ------------*- C++ -*-===//
+//===-- asan_test_utils.h ---------------------------------------*- C++ -*-===//
 //
 //                     The LLVM Compiler Infrastructure
 //
@@ -14,6 +14,12 @@
 #ifndef ASAN_TEST_UTILS_H
 #define ASAN_TEST_UTILS_H
 
+#if !defined(ASAN_EXTERNAL_TEST_CONFIG)
+# define INCLUDED_FROM_ASAN_TEST_UTILS_H
+# include "asan_test_config.h"
+# undef INCLUDED_FROM_ASAN_TEST_UTILS_H
+#endif
+
 #if defined(_WIN32)
 typedef unsigned __int8  uint8_t;
 typedef unsigned __int16 uint16_t;





More information about the llvm-commits mailing list