LLVM-AS(1)

πŸ’– LLVM-AS β€” the LLVM assembler, bestie edition πŸ’–

okay so this is llvm-as from the LLVM manual, and she is iconic. sit down, grab a strawberry, we're learning assembly-to-bitcode today πŸ“βœ¨


✨ NAME ✨

llvm-as β€” the LLVM assembler. that's it, that's her πŸ‘‘


🌸 SYNOPSIS 🌸

llvm-as [options] [filename]

πŸ¦‹ DESCRIPTION πŸ¦‹

so llvm-as is the LLVM assembler, no cap. she reads a file full of human-readable LLVM assembly language, translates all of it into LLVM bitcode, and then writes the result either into a file or straight to standard output. main character energy fr πŸ’…

if filename is omitted, or if it's literally just -, then llvm-as reads its input from standard input. yes, she's flexible like that 🫢

now if you don't specify an output file with the -o option, llvm-as decides where the output goes by following these rules:

  • if the input is standard input, then the output is standard output. symmetrical, we love her 🌈
  • if the input is a file that ends with .ll, then the output file has the same name, except the suffix gets 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 to it. appended, not replaced β€” don't get it twisted bestie πŸ’€

πŸŽ€ 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 (she's shy like that πŸ™ˆ). with this option though? llvm-as will write raw bitcode regardless of what the output device is. no vibes check, just output πŸ”₯
  • -help β€” prints a summary of the command line options. the "wait what were the flags again" button, we've all been there 😭
  • -o filename β€” specify the output file name. and if filename is -, then llvm-as sends its output to standard output instead. dash means "to the void, but make it stdout" ✨

⭐ EXIT STATUS ⭐

if llvm-as succeeds, she exits with 0. periodt. otherwise, if an error occurs, she exits with a non-zero value. not zero = something went sideways, bestie πŸ’€


πŸ’œ SEE ALSO πŸ’œ

(the reverse direction and the classic, respectively β€” iykyk)


🌸 AUTHOR 🌸

maintained by the LLVM Team (https://llvm.org/). they keep her fed and hydrated 🫢


2003-2026, LLVM Project


okay that's the whole page, and yes she really is from the LLVM project, version/date stamped 2026-07-16, page 22 of the LLVM-AS(1) manual 🧚 now go compile something gorgeous, bestie πŸ’…βœ¨

πŸ“¦ where this page comes from