Home | History | Annotate | Download | only in Driver
      1 // RUN: rm -f "%t.d" "%t1.s" "%t2.s" "%t3.s" "%t4.s" "%t5.s"
      2 //
      3 // RUN: touch %t.s
      4 // RUN: not %clang -S -DCRASH -o %t.s -MMD -MF %t.d %s
      5 // RUN: test ! -f %t.s
      6 // RUN: test ! -f %t.d
      7 
      8 // RUN: touch %t.s
      9 // RUN: not %clang -S -DMISSING -o %t.s -MMD -MF %t.d %s
     10 // RUN: test ! -f %t.s
     11 // RUN: test ! -f %t.d
     12 
     13 // RUN: touch %t.s
     14 // RUN: not %clang -S -o %t.s -MMD -MF %t.d %s
     15 // RUN: test ! -f %t.s
     16 // RUN: test -f %t.d
     17 
     18 // REQUIRES: crash-recovery
     19 
     20 #ifdef CRASH
     21 #pragma clang __debug crash
     22 #elif defined(MISSING)
     23 #include "nonexistent.h"
     24 #else
     25 invalid C code
     26 #endif
     27 
     28 // RUN: touch %t1.c
     29 // RUN: echo "invalid C code" > %t2.c
     30 // RUN: cd %T && not %clang -S %t1.c %t2.c
     31 // RUN: test -f %t1.s
     32 // RUN: test ! -f %t2.s
     33 
     34 // RUN: touch %t1.c
     35 // RUN: touch %t2.c
     36 // RUN: chmod -r %t2.c
     37 // RUN: cd %T && not %clang -S %t1.c %t2.c
     38 // RUN: test -f %t1.s
     39 // RUN: test ! -f %t2.s
     40 
     41 // When given multiple .c files to compile, clang compiles them in order until
     42 // it hits an error, at which point it stops.
     43 //
     44 // RUN: touch %t1.c
     45 // RUN: echo "invalid C code" > %t2.c
     46 // RUN: touch %t3.c
     47 // RUN: echo "invalid C code" > %t4.c
     48 // RUN: touch %t5.c
     49 // RUN: cd %T && not %clang -S %t1.c %t2.c %t3.c %t4.c %t5.c
     50 // RUN: test -f %t1.s
     51 // RUN: test ! -f %t2.s
     52 // RUN: test ! -f %t3.s
     53 // RUN: test ! -f %t4.s
     54 // RUN: test ! -f %t5.s
     55