LLVM-AS(1)

πŸ’… LLVM-AS πŸ’…

ok so this is the LLVM-AS(1) page from the LLVM manual set, and bestie, you're gonna understand the LLVM assembler by the end of this, i promise 🫢

✨ NAME ✨

llvm-as β€” the LLVM assembler, no cap. it's literally the whole vibe of this page.

🌸 SYNOPSIS 🌸

llvm-as [options] [filename]

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so. llvm-as is the LLVM assembler. she reads a file containing human-readable LLVM assembly language, translates it to LLVM bitcode, and writes the result into a file or to standard output. that's her job, and she ate πŸ’…

if filename is omitted or is -, then llvm-as reads its input from standard input. iconic behavior honestly.

if an output file is not specified with the -o option, then llvm-as sends its output to a file or standard output by following these rules β€” and yes you need to know all of them, this is important:

  • if the input is standard input, then the output is standard output.
  • 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.
  • 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 basically .ll in, .bc out. the way she just swaps the suffix?? main character energy fr 🌈


πŸŽ€ OPTIONS πŸŽ€

  • -f β€” Enable binary output on terminals. literally normally llvm-as will refuse to write raw bitcode output if the output stream is a terminal (she's got boundaries 😌). with this option, llvm-as will write raw bitcode regardless of the output device. it's giving chaos, but it's your chaos πŸ’€
  • -help β€” Print a summary of command line options. your little cheat sheet, your bestie holding your hand 🫢
  • -o filename β€” Specify the output file name. if filename is -, then llvm-as sends its output to standard output. simple as that, periodt.

πŸ’– EXIT STATUS πŸ’–

if llvm-as succeeds, it will exit with 0. otherwise, if an error occurs, it will exit with a non-zero value. so like, 0 = slay, anything else = not slay 😭

πŸ”₯ SEE ALSO πŸ”₯

llvm-dis(1), as(1) β€” go read those too, iykyk 🧚

πŸ‘‘ AUTHOR πŸ‘‘

Maintained by the LLVM Team (https://llvm.org/). her keepers, her mgmt, her whole team fr fr πŸ’œ

2003-2023, LLVM Project


ok that's the whole thing, every last detail, nothing skipped ✨ and a cute little sign-off for you: this was page 15 of the manual, dated 2023-07-14, from the LLVM source set β€” LLVM-AS(1) forever, bye bestie πŸ’•πŸ¦‹

πŸ“¦ where this page comes from