1 // Test that we can consume LLVM IR/bitcode in the frontend and produce 2 // 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.s 8 9 // LLVM bitcode: 10 // RUN: %clang_cc1 -emit-llvm-bc -o %t.bc %s 11 // RUN: %clang_cc1 -S -o - %t.bc | grep -v '\.file' > %t.bc.s 12 // RUN: diff %t.s %t.bc.s 13 14 // LLVM IR source code: 15 // RUN: %clang_cc1 -emit-llvm -o %t.ll %s 16 // RUN: %clang_cc1 -S -o - %t.ll | grep -v '\.file' > %t.ll.s 17 // RUN: diff %t.s %t.ll.s 18 19 int f() { return 0; } 20