llvm-as.rst 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. llvm-as - LLVM assembler
  2. ========================
  3. .. program:: llvm-as
  4. SYNOPSIS
  5. --------
  6. **llvm-as** [*options*] [*filename*]
  7. DESCRIPTION
  8. -----------
  9. **llvm-as** is the LLVM assembler. It reads a file containing human-readable
  10. LLVM assembly language, translates it to LLVM bitcode, and writes the result
  11. into a file or to standard output.
  12. If *filename* is omitted or is ``-``, then **llvm-as** reads its input from
  13. standard input.
  14. If an output file is not specified with the **-o** option, then
  15. **llvm-as** sends its output to a file or standard output by following
  16. these rules:
  17. * If the input is standard input, then the output is standard output.
  18. * If the input is a file that ends with ``.ll``, then the output file is of the
  19. same name, except that the suffix is changed to ``.bc``.
  20. * If the input is a file that does not end with the ``.ll`` suffix, then the
  21. output file has the same name as the input file, except that the ``.bc``
  22. suffix is appended.
  23. OPTIONS
  24. -------
  25. **-f**
  26. Enable binary output on terminals. Normally, **llvm-as** will refuse to
  27. write raw bitcode output if the output stream is a terminal. With this option,
  28. **llvm-as** will write raw bitcode regardless of the output device.
  29. **-help**
  30. Print a summary of command line options.
  31. **-o** *filename*
  32. Specify the output file name. If *filename* is ``-``, then **llvm-as**
  33. sends its output to standard output.
  34. EXIT STATUS
  35. -----------
  36. If **llvm-as** succeeds, it will exit with 0. Otherwise, if an error occurs, it
  37. will exit with a non-zero value.
  38. SEE ALSO
  39. --------
  40. :manpage:`llvm-dis(1)`, as(1)