From 0a6d1e2938d1d907920890e6efb3bde084a1d6f5 Mon Sep 17 00:00:00 2001 From: Alexey Samsonov Date: Wed, 19 Aug 2015 17:28:01 +0000 Subject: [PATCH] Replace __asan_set_error_exit_code() with __sanitizer_set_death_callback() Summary: We are going to remove the former soon. Reviewers: EricWF Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D12117 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@245467 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/libcxx/containers/sequences/vector/asan.pass.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/test/libcxx/containers/sequences/vector/asan.pass.cpp b/test/libcxx/containers/sequences/vector/asan.pass.cpp index 0a1114794..b102fc08d 100644 --- a/test/libcxx/containers/sequences/vector/asan.pass.cpp +++ b/test/libcxx/containers/sequences/vector/asan.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: clang-3.3, clang-3.4, clang-3.5 + // // reference operator[](size_type n); @@ -21,8 +23,11 @@ #include "test_macros.h" #ifndef _LIBCPP_HAS_NO_ASAN -extern "C" void __asan_set_error_exit_code(int); +extern "C" void __sanitizer_set_death_callback(void (*callback)(void)); +void do_exit() { + exit(0); +} int main() { @@ -48,7 +53,7 @@ int main() assert(is_contiguous_container_asan_correct(v)); } - __asan_set_error_exit_code(0); + __sanitizer_set_death_callback(do_exit); { typedef int T; typedef std::vector C;