[llvm-commits] [compiler-rt] r159347 - in /compiler-rt/trunk/lib: asan/tests/CMakeLists.txt asan/tests/asan_noinst_test.cc interception/CMakeLists.txt
Kostya Serebryany
kcc at google.com
Thu Jun 28 06:26:07 PDT 2012
On Thu, Jun 28, 2012 at 5:12 PM, Alexey Samsonov <samsonov at google.com>wrote:
> Author: samsonov
> Date: Thu Jun 28 08:12:07 2012
> New Revision: 159347
>
> URL: http://llvm.org/viewvc/llvm-project?rev=159347&view=rev
> Log:
> [ASan] silence various warnings in cmake build of asan unit tests
>
> Modified:
> compiler-rt/trunk/lib/asan/tests/CMakeLists.txt
> compiler-rt/trunk/lib/asan/tests/asan_noinst_test.cc
> compiler-rt/trunk/lib/interception/CMakeLists.txt
>
> Modified: compiler-rt/trunk/lib/asan/tests/CMakeLists.txt
> URL:
> http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/tests/CMakeLists.txt?rev=159347&r1=159346&r2=159347&view=diff
>
> ==============================================================================
> --- compiler-rt/trunk/lib/asan/tests/CMakeLists.txt (original)
> +++ compiler-rt/trunk/lib/asan/tests/CMakeLists.txt Thu Jun 28 08:12:07
> 2012
> @@ -14,8 +14,9 @@
> include_directories(..)
> include_directories(../..)
>
> -set(ASAN_UNITTEST_COMMON_CFLAGS
> +set(ASAN_UNITTEST_COMMON_CFLAGS
> -Wall
> + -Wno-format
> -fvisibility=hidden
> )
>
> @@ -101,7 +102,7 @@
>
> add_asan_compile_cxx_command(asan_globals_test.cc)
> add_asan_compile_cxx_command(asan_test.cc)
> - set(ASAN_INSTRUMENTED_TESTS
> + set(ASAN_INSTRUMENTED_TESTS
> asan_globals_test.cc.asan.o
> asan_test.cc.asan.o
> )
>
> 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=159347&r1=159346&r2=159347&view=diff
>
> ==============================================================================
> --- compiler-rt/trunk/lib/asan/tests/asan_noinst_test.cc (original)
> +++ compiler-rt/trunk/lib/asan/tests/asan_noinst_test.cc Thu Jun 28
> 08:12:07 2012
> @@ -329,7 +329,7 @@
> }
>
> TEST(AddressSanitizerInterface, GetEstimatedAllocatedSize) {
> - EXPECT_EQ(1, __asan_get_estimated_allocated_size(0));
> + EXPECT_EQ(1U, __asan_get_estimated_allocated_size(0));
> const size_t sizes[] = { 1, 30, 1<<30 };
> for (size_t i = 0; i < 3; i++) {
> EXPECT_EQ(sizes[i], __asan_get_estimated_allocated_size(sizes[i]));
> @@ -362,7 +362,7 @@
>
> // NULL is not owned, but is a valid argument for
> __asan_get_allocated_size().
> EXPECT_EQ(false, __asan_get_ownership(NULL));
> - EXPECT_EQ(0, __asan_get_allocated_size(NULL));
> + EXPECT_EQ(0U, __asan_get_allocated_size(NULL));
>
> // When memory is freed, it's not owned, and call to GetAllocatedSize
> // is forbidden.
> @@ -687,3 +687,9 @@
> for (size_t i = 0, n = pointers.size(); i < n; i++)
> free(pointers[i]);
> }
> +
> +int main(int argc, char **argv) {
> + testing::GTEST_FLAG(death_test_style) = "threadsafe";
> + testing::InitGoogleTest(&argc, argv);
> + return RUN_ALL_TESTS();
> +}
>
>
Does this still work with our old Makefiles?
> Modified: compiler-rt/trunk/lib/interception/CMakeLists.txt
> URL:
> http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/interception/CMakeLists.txt?rev=159347&r1=159346&r2=159347&view=diff
>
> ==============================================================================
> --- compiler-rt/trunk/lib/interception/CMakeLists.txt (original)
> +++ compiler-rt/trunk/lib/interception/CMakeLists.txt Thu Jun 28 08:12:07
> 2012
> @@ -14,6 +14,9 @@
> endif ()
>
> set(INTERCEPTION_CFLAGS "-fPIC -fno-exceptions -funwind-tables
> -fvisibility=hidden")
> +if (SUPPORTS_NO_VARIADIC_MACROS_FLAG)
> + set(INTERCEPTION_CFLAGS "${INTERCEPTION_CFLAGS} -Wno-variadic-macros")
> +endif ()
>
> set(INTERCEPTION_COMMON_DEFINITIONS
> INTERCEPTION_HAS_EXCEPTIONS=1)
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120628/80e8244f/attachment.html>
More information about the llvm-commits
mailing list