1 // RUN: export LSAN_OPTIONS=detect_leaks=0 2 // RUN: rm -f "%t.d" "%t1.s" "%t2.s" "%t3.s" "%t4.s" "%t5.s" 3 // 4 // RUN: touch %t.s 5 // RUN: not %clang -S -DCRASH -o %t.s -MMD -MF %t.d %s 6 // RUN: test ! -f %t.s 7 // RUN: test ! -f %t.d 8 9 // RUN: touch %t.s 10 // RUN: not %clang -S -DMISSING -o %t.s -MMD -MF %t.d %s 11 // RUN: test ! -f %t.s 12 // RUN: test ! -f %t.d 13 14 // RUN: touch %t.s 15 // RUN: not %clang -S -o %t.s -MMD -MF %t.d %s 16 // RUN: test ! -f %t.s 17 // RUN: test -f %t.d 18 19 // REQUIRES: crash-recovery 20 21 #ifdef CRASH 22 #pragma clang __debug crash 23 #elif defined(MISSING) 24 #include "nonexistent.h" 25 #else 26 invalid C code 27 #endif 28 29 // RUN: rm -rf %t-dir 30 // RUN: mkdir -p %t-dir 31 // RUN: cd %t-dir 32 33 // RUN: touch %t-dir/1.c 34 // RUN: echo "invalid C code" > %t-dir/2.c 35 // RUN: not %clang -S %t-dir/1.c %t-dir/2.c 36 // RUN: test -f %t-dir/1.s 37 // RUN: test ! -f %t-dir/2.s 38 39 // RUN: touch %t-dir/1.c 40 // RUN: touch %t-dir/2.c 41 // RUN: chmod -r %t-dir/2.c 42 // RUN: not %clang -S %t-dir/1.c %t-dir/2.c 43 // RUN: test -f %t-dir/1.s 44 // RUN: test ! -f %t-dir/2.s 45 // RUN: rm -f %t-dir/2.c 46