[asan] Fixup to r286608 that makes the test pass on iOS.
authorAnna Zaks <ganna@apple.com>
Tue, 15 Nov 2016 01:57:29 +0000 (01:57 +0000)
committerAnna Zaks <ganna@apple.com>
Tue, 15 Nov 2016 01:57:29 +0000 (01:57 +0000)
TARGET_OS_IPHONE is defined in TargetConditionals.h. Without the include the
iOS path is never triggered.

llvm-svn: 286929

compiler-rt/test/asan/TestCases/exitcode.cc

index 276934fe2116ee839ac90ebdd3e6b5c908dad635..cb10540999b7d53f5f428c863bb14f61f1f11aca 100644 (file)
@@ -61,6 +61,10 @@ int spawn_child(char **argv) {
 #include <errno.h>
 #include <sys/wait.h>
 
+#if defined(__APPLE__)
+#include <TargetConditionals.h>
+#endif
+
 #if defined(__APPLE__) && !(defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE)
 #define USE_NSGETENVIRON 1
 #else