Include setjmp.h unconditionally in asan_test_utils.h
authorHans Wennborg <hans@hanshq.net>
Wed, 17 May 2017 16:44:08 +0000 (16:44 +0000)
committerHans Wennborg <hans@hanshq.net>
Wed, 17 May 2017 16:44:08 +0000 (16:44 +0000)
It's used in asan_test.cc also on Windows, and my build was failing
with:

C:/src/llvm/projects/compiler-rt/lib/asan/tests/asan_test.cc:549:28: error: unknown type name 'jmp_buf'
NOINLINE void LongJmpFunc1(jmp_buf buf) {
                           ^
C:/src/llvm/projects/compiler-rt/lib/asan/tests/asan_test.cc:569:10: error: unknown type name 'jmp_buf'
  static jmp_buf buf;
         ^

I couldn't find what changed to make this not work anymore, but this should fix
it.

llvm-svn: 303273

compiler-rt/lib/asan/tests/asan_test_utils.h

index f16d939..c292467 100644 (file)
 #include <stdint.h>
 #include <assert.h>
 #include <algorithm>
+#include <setjmp.h>
 
 #if !defined(_WIN32)
 # include <strings.h>
 # include <sys/mman.h>
-# include <setjmp.h>
 #endif
 
 #ifdef __linux__