Alp Toker | 1a5a520 | 2014-06-27 02:04:28 +0000 | [diff] [blame^] | 1 | // Test that we can consume LLVM IR/bitcode in the frontend and produce |
| 2 | // identical output to a standard compilation. |
| 3 | |
| 4 | // Reference output: |
| 5 | // RUN: %clang_cc1 -S -o %t.s %s |
| 6 | |
| 7 | // LLVM bitcode: |
| 8 | // RUN: %clang_cc1 -emit-llvm-bc -o %t.bc %s |
| 9 | // RUN: %clang_cc1 -S -o - %t.bc > %t.bc.s |
| 10 | // RUN: diff %t.s %t.bc.s |
| 11 | |
| 12 | // LLVM IR source code: |
| 13 | // RUN: %clang_cc1 -emit-llvm-bc -o %t.ll %s |
| 14 | // RUN: %clang_cc1 -S -o - %t.ll > %t.ll.s |
| 15 | // RUN: diff %t.s %t.ll.s |
| 16 | |
| 17 | int f() { return 0; } |