Confusion about LLVM file IRL extension

What is the actual LLVM file extension IR? Is is .llor .s? Some sources say this .ll, and some point to .s.

+4
source share
1 answer

The real answer is that it does not matter. Tools can accept any files that you give them, they do not care about the name. This is just an agreement.

For a more direct answer, the traditional extension .ll(for LLVM, I suppose). However, some tools want to handle LLVM IR in the same way as assembly files, and therefore prefer to use the extension .s. I myself prefer .llbecause it clarifies the difference more clearly. Using LLVM tools such as llc, you can convert LLVM IR into a machine-specific aggregate, and I like to see a .lltransition .sin this case. If LLVM IR in files .swill be confused.

+7
source

All Articles