clang with multiple input .c and .h files

Hello,

I would like to generate LLVM byte code for some .c and .h files in a
benchmark. Is Clang (or llvm-gcc) has an option for me to input
multiple c files and generate 1 byte code file?

I think generating byte code for each .c file and compile and link
them later is not a good idea since the programs are related to each
other.

Any suggestions about how I should do it?

gcc has a '-combine' option but it has been removed in the recent 4.6
release. Is clang not going to support that feature?

Thanks and happy holidays!

Christine

Hi,

I decided to work with individual files now and link them together later.

Thanks,

Christine

Christine Cheng wrote:

Hello,

I would like to generate LLVM byte code for some .c and .h files in a
benchmark. Is Clang (or llvm-gcc) has an option for me to input
multiple c files and generate 1 byte code file?

I think generating byte code for each .c file and compile and link
them later is not a good idea since the programs are related to each
other.

Any suggestions about how I should do it?

$ llvm-link *.bc -o combined.bc

should work.

Nick