[clang] Handle __declspec() attributes in using
[llvm-project.git] / clang / test / Frontend / ir-support.c
blobd0c7dfa418cad2d9d0cc4edbced69b278915e0ea
1 // Test that we can consume LLVM IR/bitcode in the frontend and produce
2 // equivalent output to a standard compilation.
4 // We strip differing '.file' directives before comparing.
6 // Reference output:
7 // RUN: %clang_cc1 -S -o - %s | grep -v '\.file' > %t.s
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
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
19 int f(void) { return 0; }