LLVM-AS(1)

πŸ“¦ version 23.1.3, in centos-stream 9

πŸ’… LLVM-AS(1) β€” the LLVM assembler, but make it make sense

okay so real talk, this is the llvm-as page from the LLVM manual set β€” yes, that LLVM, the big compiler-infrastructure one. it's short, it's sweet, and honestly it's kind of iconic. let's get into it 🫢


✨ SYNOPSIS ✨

llvm-as [options] [filename]

that's it. that's the whole vibe. options first, filename optional, we move πŸ¦‹


🌸 DESCRIPTION 🌸

bestie. llvm-as is the LLVM assembler. that's the whole job. it reads a file full of human-readable LLVM assembly language, translates it into LLVM bitcode, and writes the result out β€” either into a file or straight to standard output. translating, slaying, periodt ✨

if filename is left out entirely, or if it's literally just -, then llvm-as reads its input from standard input. no filename? no problem. stdin is the main character πŸ’…

and now the part everyone asks about β€” if you don't specify an output file with the -o option, llvm-as picks where the output goes by following these rules, in order, no cap:

  • if the input is standard input, then the output is standard output. matching energies πŸ’–
  • if the input is a file that ends with .ll, then the output file is the same name, except the suffix is changed to .bc. glow-up via extension swap πŸ¦‹
  • 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. so it just gets a little bonus tag at the end, we love that for it πŸŽ€

πŸ”₯ OPTIONS πŸ”₯

  • -f β€” enable binary output on terminals. normally llvm-as absolutely refuses to write raw bitcode output if the output stream is a terminal (it's protecting you, it's giving protective bestie energy). with this option though, llvm-as will write raw bitcode regardless of the output device. chaos mode: activated πŸ’€
  • -help β€” print a summary of command line options. your little cheat sheet, your lore dump, your iykyk 🧚
  • -o filename β€” specify the output file name. and if filename is -, then llvm-as sends its output to standard output. dash supremacy πŸ‘‘

⭐ EXIT STATUS ⭐

if llvm-as succeeds, it will exit with 0. queen behavior, we stan 🌈

otherwise, if an error occurs, it will exit with a non-zero value. 😭 it happens to the best of us.


πŸ¦‹ SEE ALSO πŸ¦‹

llvm-dis(1), as(1)

(the reverse-direction bestie and the classic, respectively β€” go say hi 🫢)


πŸ‘‘ AUTHOR πŸ‘‘

maintained by the LLVM Team (https://llvm.org/). they're out here doing the work, respect on their name πŸ’œ


2003-2026, LLVM Project


okay that's the whole page, you're officially educated ✨ and for the record, this was page 23, dated 2026-10-06, from the LLVM source β€” mwah, go compile something cute πŸ’–πŸŽ€

πŸ“¦ where this page comes from