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. sothing.llbecomesthing.bc. slay. - if the input is a file that does not end with the
.llsuffix, then the output file has the same name as the input file, except that the.bcsuffix is appended. sothingbecomesthing.bc. no deleting, just adding. π
π OPTIONS π
-fβ enable binary output on terminals. normallyllvm-aswill refuse to write raw bitcode output if the output stream is a terminal (she's got boundaries, respect them). with this option,llvm-aswill 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.-ofilename β specify the output file name. if filename is-, thenllvm-assends 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 backas(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. π
π COPYRIGHT π
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
- ubuntu stonking: llvm-18 1:18.1.8-20ubuntu11 Β· APACHE-2-LLVM-EXCEPTIONS
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms