LLVM-AS(1)

πŸ“¦
version 11.1.0 Β· 2 versions
, in fedora 43, fedora 44

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

okay so you found yourself at the LLVM-AS(1) page, part of the LLVM manual, and honestly? you're in the right place. let's get into it ✨


🌸 NAME 🌸

llvm-as β€” the LLVM assembler. that's it, that's the girl. she takes your human-readable vibes and turns them into bitcode. iconic behavior, no cap.


πŸŽ€ SYNOPSIS πŸŽ€

llvm-as [options] [filename]

πŸ¦‹ DESCRIPTION πŸ¦‹

so llvm-as is the LLVM assembler. what she does is: she reads a file full of human-readable LLVM assembly language, translates all of it into LLVM bitcode, and then writes the result into a file or straight to standard output. that's the whole job. she ate. πŸ’–

if filename is omitted, or if it's literally just -, then llvm-as reads her input from standard input. yes bestie, she'll take it from stdin, she's flexible like that. 🫢

and if you didn't specify an output file with the -o option? don't worry, she's got rules. she picks where the output goes by following these:

  • if the input is standard input, then the output is standard output. symmetric, matching, adorable. ✨
  • 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. glow-up, but for file extensions. πŸ’…
  • 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 .bc gets appended to the end. no replacement, just tacked on. periodt.

✨ OPTIONS ✨

  • -f β€” enables binary output on terminals. normally llvm-as will straight up refuse to write raw bitcode output if the output stream is a terminal (she's protective like that, and for good reason). with this option though, she'll write raw bitcode regardless of the output device. you asked for it, you got it. 😭
  • -help β€” prints a summary of the command line options. your little cheat sheet. use it. πŸŽ€
  • -o filename β€” specify the output file name. and if filename is -, then llvm-as sends her output to standard output. classic dash move. 🌈

πŸ’€ EXIT STATUS πŸ’€

if llvm-as succeeds, she exits with 0. slay. πŸ’š

otherwise, if an error occurs, she exits with a non-zero value. so like, if your script is checking, anything not 0 means something went sideways. πŸ™ˆ


πŸ‘‘ SEE ALSO πŸ‘‘

llvm-dis(1), as(1)

go read those too, they're part of the fam. iykyk. πŸ¦‹


🌟 AUTHOR 🌟

maintained by the LLVM Team (https://llvm.org/). yeah, the whole team. they're the main characters here, fr fr. πŸ‘‘


2003-2024, LLVM Project


and that's the tea bestie β€” this little slice of LLVM-AS(1) is from the LLVM manual, page 11 of the set, dated 2024-07-18. go assemble something gorgeous. πŸ’–βœ¨πŸ«Ά

πŸ“¦ where this page comes from