LLVM-AS(1)

πŸ“¦
version 12.0.1 Β· 4 versions
, in fedora 43, fedora 44

✨ LLVM-AS(1) ✨

okay bestie, welcome to the LLVM manual, section 1 πŸ’– this one's about llvm-as, and it's genuinely so much less scary than it sounds. buckle up πŸŽ€


πŸ’… NAME

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


🌸 SYNOPSIS

llvm-as [options] [filename]

πŸ¦‹ DESCRIPTION

so llvm-as is the LLVM assembler, no cap. what she does is: you hand her a file full of human-readable LLVM assembly language, she translates it into LLVM bitcode, and then she writes the result out to a file or straight to standard output. translate + write, that's the whole vibe ✨

if filename is omitted, or if it's literally just -, then llvm-as reads her input from standard input. yes, the humble dash. she respects it. 🫢

now, if you don't specify an output file with the -o option, llvm-as picks where her output goes by following these rules, and you're gonna want to know them because they're lowkey specific:

  • if the input is standard input, then the output is standard output. matching energy πŸ’…
  • if the input is a file that ends with .ll, then the output file is 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 gets appended. not swapped, appended. important distinction bestie 😭

πŸ’– OPTIONS

  • -f β€” enables binary output on terminals. normally, llvm-as will flat-out refuse to write raw bitcode output if the output stream is a terminal (she's got boundaries 🚧). with this option she'll write raw bitcode regardless of the output device. no thoughts, just bytes.
  • -help β€” prints a summary of command line options. the classic cry for help, but make it documentation 🌈
  • -o filename β€” specifies the output file name. and if filename is -, then llvm-as sends her output to standard output. dash strikes again πŸ“

⭐ EXIT STATUS

if llvm-as succeeds, she exits with 0. slay. πŸ’š otherwise, if an error occurs, she exits with a non-zero value. so yeah, check that exit code, it's giving ✨communication✨


πŸ”₯ SEE ALSO

llvm-dis(1), as(1)

(the squad. go say hi. iykyk πŸ‘‘)


🌈 AUTHOR

Maintained by the LLVM Team (https://llvm.org/). they're the ones keeping this whole thing running, respect 🫑


2003-2024, LLVM Project


and that's the page fr fr πŸ’œ this was LLVM, dated 2024-07-18, page 12 of the manual β€” tysm for reading, go assemble something gorgeous, mwah πŸ˜˜πŸ’…

πŸ“¦ where this page comes from