20 lines · c
1// Test that we can consume LLVM IR/bitcode in the frontend and produce2// equivalent output to a standard compilation.3 4// We strip differing '.file' directives before comparing.5 6// Reference output:7// RUN: %clang_cc1 -S -o - %s | grep -v '\.file' > %t.s8 9// LLVM bitcode:10// RUN: %clang_cc1 -emit-llvm-bc -o %t.bc %s11// RUN: %clang_cc1 -S -o - %t.bc | grep -v '\.file' > %t.bc.s12// RUN: diff %t.s %t.bc.s13 14// LLVM IR source code:15// RUN: %clang_cc1 -emit-llvm -o %t.ll %s16// RUN: %clang_cc1 -S -o - %t.ll | grep -v '\.file' > %t.ll.s17// RUN: diff %t.s %t.ll.s18 19int f(void) { return 0; }20