LLVM-AS(1)

✨ LLVM-AS ✨

ok so bestie, welcome to the llvm-as page β€” the one and only LLVM assembler, straight out of the LLVM manual. pull up a chair, we're gonna get you fluent fr fr πŸ’–


🌸 SYNOPSIS 🌸

llvm-as [options] [filename]

πŸ¦‹ DESCRIPTION πŸ¦‹

llvm-as is the LLVM assembler β€” main character energy only πŸ‘‘. What it does is: it reads a file stuffed with human-readable LLVM assembly language</>, translates all that into LLVM bitcode</>, and then writes the result out into a file or straight to standard output. iconic behaviour, no notes πŸ’…

So okay, about filename β€” if you omit it entirely, or if you literally just pass -, then llvm-as reads its input from standard input</>. easy ✨

And if you don't specify an output file with the -o option, llvm-as will figure out where to send its output by following these rules (they're giving very organized, very demure):

  • If the input is standard input, then the output is standard output</> 🫢
  • If the input is a file that ends with .ll, then the output file is of the same name, except that the suffix is changed to .bc πŸŽ€
  • If the input is a file that does not end with the .ll suffix, then the output file has the same name as the input file, except that the .bc suffix is appended 🌸

like, it just knows. iykyk πŸ’œ


πŸ’… OPTIONS πŸ’…

  • -f β€” enables binary output on terminals πŸ”₯. normally llvm-as will straight up refuse to write raw bitcode output if the output stream is a terminal (it's protective like that πŸ™ˆ). with this option, llvm-as will write raw bitcode regardless of the output device. bold. love that for it.
  • -help β€” prints a summary of the command line options ✨ your little cheat sheet.
  • -o filename β€” specify the output file name πŸ’–. and if filename is -, then llvm-as sends its output to standard output. classic.

⭐ EXIT STATUS ⭐

If llvm-as succeeds, it will exit with 0 πŸŽ‰ slay.

Otherwise, if an error occurs, it will exit with a non-zero value 😭 so like, watch for that.


🧚 SEE ALSO 🧚


🌈 Author 🌈

Maintained by the LLVM Team (https://llvm.org/) 🫢 go give them a follow, honestly.

2003-2026, LLVM Project


and that's the whole vibe check, bestie πŸ’€βœ¨ this page is from the LLVM manual, source/version 21, dated 2026-05-15 β€” go forth and assemble, you've got this fr fr πŸ’œπŸŽ€

πŸ“¦ where this page comes from