brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.0 KiB · 3628df8 Raw
46 lines · c
1// RUN: export LSAN_OPTIONS=detect_leaks=02// RUN: rm -f "%t.d" "%t1.s" "%t2.s" "%t3.s" "%t4.s" "%t5.s"3//4// RUN: touch %t.s5// RUN: not %clang -S -DCRASH -o %t.s -MMD -MF %t.d %s6// RUN: test ! -f %t.s7// RUN: test ! -f %t.d8 9// RUN: touch %t.s10// RUN: not %clang -S -DMISSING -o %t.s -MMD -MF %t.d %s11// RUN: test ! -f %t.s12// RUN: test ! -f %t.d13 14// RUN: touch %t.s15// RUN: not %clang -S -o %t.s -MMD -MF %t.d %s16// RUN: test ! -f %t.s17// RUN: test -f %t.d18 19// REQUIRES: crash-recovery20 21#ifdef CRASH22#pragma clang __debug crash23#elif defined(MISSING)24#include "nonexistent.h"25#else26invalid C code27#endif28 29// RUN: rm -rf %t-dir30// RUN: mkdir -p %t-dir31// RUN: cd %t-dir32 33// RUN: touch %t-dir/1.c34// RUN: echo "invalid C code" > %t-dir/2.c35// RUN: not %clang -S %t-dir/1.c %t-dir/2.c36// RUN: test -f %t-dir/1.s37// RUN: test ! -f %t-dir/2.s38 39// RUN: touch %t-dir/1.c40// RUN: touch %t-dir/2.c41// RUN: chmod -r %t-dir/2.c42// RUN: not %clang -S %t-dir/1.c %t-dir/2.c43// RUN: test -f %t-dir/1.s44// RUN: test ! -f %t-dir/2.s45// RUN: rm -f %t-dir/2.c46