mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-05-13 17:37:00 +00:00

A significant number of our tests in C accidentally use functions without prototypes. This patch converts the function signatures to have a prototype for the situations where the test is not specific to K&R C declarations. e.g., void func(); becomes void func(void); This is the sixth batch of tests being updated (there are a significant number of other tests left to be updated).
20 lines
591 B
C
20 lines
591 B
C
// Test that we can consume LLVM IR/bitcode in the frontend and produce
|
|
// equivalent output to a standard compilation.
|
|
|
|
// We strip differing '.file' directives before comparing.
|
|
|
|
// Reference output:
|
|
// RUN: %clang_cc1 -S -o - %s | grep -v '\.file' > %t.s
|
|
|
|
// LLVM bitcode:
|
|
// RUN: %clang_cc1 -emit-llvm-bc -o %t.bc %s
|
|
// RUN: %clang_cc1 -S -o - %t.bc | grep -v '\.file' > %t.bc.s
|
|
// RUN: diff %t.s %t.bc.s
|
|
|
|
// LLVM IR source code:
|
|
// RUN: %clang_cc1 -emit-llvm -o %t.ll %s
|
|
// RUN: %clang_cc1 -S -o - %t.ll | grep -v '\.file' > %t.ll.s
|
|
// RUN: diff %t.s %t.ll.s
|
|
|
|
int f(void) { return 0; }
|