LLVM-AS(1)

πŸ’… LLVM-AS(1) β€” the LLVM assembler, bestie edition

okay so real quick β€” you're reading the manual page for llvm-as from the LLVM manual set, and I'm gonna walk you through it like we're texting at 2am. stay with me, it's actually so good. 🫢


✨ NAME ✨

llvm-as β€” the LLVM assembler. that's it, that's the whole vibe. it assembles. iconic behavior. πŸ‘‘


🌸 SYNOPSIS 🌸

llvm-as [options] [filename]

like, options are optional (obvi), filename is optional too. she's flexible. πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

so llvm-as is the LLVM assembler. here's the tea: it reads a file that contains human-readable LLVM assembly language, translates it into LLVM bitcode, and then writes the result into a file or straight to standard output. no cap, that's the whole job. ✨

if filename is omitted, or if it's literally just -, then llvm-as reads its input from standard input. yes, the dash means stdin. classic move.

now β€” the output rules, because this is where people get confused and I refuse to let that be you. if you don't specify an output file with the -o option, then llvm-as sends its output to a file or standard output by following these rules:

  • if the input is standard input, then the output is standard output. simple. mirror energy. πŸͺž
  • 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. so thing.ll becomes thing.bc. slay.
  • 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 thing becomes thing.bc. no deleting, just adding. πŸ’€

πŸŽ€ OPTIONS πŸŽ€

  • -f β€” enable binary output on terminals. normally llvm-as will refuse to write raw bitcode output if the output stream is a terminal (she's got boundaries, respect them). with this option, llvm-as will write raw bitcode regardless of the output device. so like, at your own risk bestie, that's raw bytes hitting your terminal. 😭
  • -help β€” print a summary of command line options. the "wait what were the flags again" button. lifesaver fr fr.
  • -o filename β€” specify the output file name. if filename is -, then llvm-as sends its output to standard output. dash = stdout, same dash energy as the input side. ✨

⭐ EXIT STATUS ⭐

if llvm-as succeeds, it will exit with 0. otherwise, if an error occurs, it will exit with a non-zero value. that's it. zero means she ate, non-zero means something went sideways. πŸ“


πŸ’– SEE ALSO πŸ’–

  • llvm-dis(1) <llvm-dis.html> β€” the reverse girlie, disassembles the bitcode back
  • as(1) β€” the classic assembler, the OG

🧚 AUTHOR 🧚

maintained by the LLVM Team (https://llvm.org/). they're out here doing the lord's work, lowkey. 🌈


2003-2026, LLVM Project β€” yeah, they've been at this a minute. respect the longevity. πŸ’œ


okay that's the whole page, you're officially literate in llvm-as now. go assemble something and make it everyone's problem. 🌸

and finally β€” cute little sign-off: this is from LLVM source release 15, dated 2026-09-09, and the page lives in the LLVM-AS(1) section of the manual. mwah. πŸ’‹

πŸ“¦ where this page comes from