1*0a6a1f1dSLionel Sambuc // Test that we can consume LLVM IR/bitcode in the frontend and produce 2*0a6a1f1dSLionel Sambuc // equivalent output to a standard compilation. 3*0a6a1f1dSLionel Sambuc 4*0a6a1f1dSLionel Sambuc // We strip differing '.file' directives before comparing. 5*0a6a1f1dSLionel Sambuc 6*0a6a1f1dSLionel Sambuc // Reference output: 7*0a6a1f1dSLionel Sambuc // RUN: %clang_cc1 -S -o - %s | grep -v '\.file' > %t.s 8*0a6a1f1dSLionel Sambuc 9*0a6a1f1dSLionel Sambuc // LLVM bitcode: 10*0a6a1f1dSLionel Sambuc // RUN: %clang_cc1 -emit-llvm-bc -o %t.bc %s 11*0a6a1f1dSLionel Sambuc // RUN: %clang_cc1 -S -o - %t.bc | grep -v '\.file' > %t.bc.s 12*0a6a1f1dSLionel Sambuc // RUN: diff %t.s %t.bc.s 13*0a6a1f1dSLionel Sambuc 14*0a6a1f1dSLionel Sambuc // LLVM IR source code: 15*0a6a1f1dSLionel Sambuc // RUN: %clang_cc1 -emit-llvm -o %t.ll %s 16*0a6a1f1dSLionel Sambuc // RUN: %clang_cc1 -S -o - %t.ll | grep -v '\.file' > %t.ll.s 17*0a6a1f1dSLionel Sambuc // RUN: diff %t.s %t.ll.s 18*0a6a1f1dSLionel Sambuc f()19*0a6a1f1dSLionel Sambucint f() { return 0; } 20