What is the actual extension of a LLVM IR file? Is is .ll or .s? Some sources say it is .ll while some points to .s.
The real answer is that it doesn't matter. The tools can accept any file you give them, they don't care about the name. The name is just a convention.
To answer more directly, the traditional extension is .ll (for LLVM, I presume). However, some toolchains want to treat LLVM IR the same as assembly files and hence prefer to use the .s extension. Myself, I prefer .ll because it clarifies the difference more clearly. Using LLVM tools like llc it's possible to transform LLVM IR to machine-specific assembly, and I like seeing the .ll -> .s transition in this case. Having LLVM IR in .s files would be confusing.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With