llvm-as.rst 1.5 KB

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