blob: 97dcaf15bd054c088a96884016efd89b8514f15d [file] [log] [blame]
Daniel Dunbar8f4a8a62012-05-08 16:50:35 +00001llvm-as - LLVM assembler
2========================
3
James Hendersona0566842019-06-27 13:24:46 +00004.. program:: llvm-as
5
Daniel Dunbar8f4a8a62012-05-08 16:50:35 +00006SYNOPSIS
7--------
8
Daniel Dunbar8f4a8a62012-05-08 16:50:35 +00009**llvm-as** [*options*] [*filename*]
10
Daniel Dunbar8f4a8a62012-05-08 16:50:35 +000011DESCRIPTION
12-----------
13
Daniel Dunbar8f4a8a62012-05-08 16:50:35 +000014**llvm-as** is the LLVM assembler. It reads a file containing human-readable
15LLVM assembly language, translates it to LLVM bitcode, and writes the result
16into a file or to standard output.
17
18If *filename* is omitted or is ``-``, then **llvm-as** reads its input from
19standard input.
20
21If an output file is not specified with the **-o** option, then
22**llvm-as** sends its output to a file or standard output by following
23these rules:
24
Bill Wendling4a8948d2012-06-20 11:25:11 +000025* If the input is standard input, then the output is standard output.
Daniel Dunbar8f4a8a62012-05-08 16:50:35 +000026
Bill Wendling4a8948d2012-06-20 11:25:11 +000027* If the input is a file that ends with ``.ll``, then the output file is of the
28 same name, except that the suffix is changed to ``.bc``.
Daniel Dunbar8f4a8a62012-05-08 16:50:35 +000029
Bill Wendling4a8948d2012-06-20 11:25:11 +000030* If the input is a file that does not end with the ``.ll`` suffix, then the
31 output file has the same name as the input file, except that the ``.bc``
32 suffix is appended.
Daniel Dunbar8f4a8a62012-05-08 16:50:35 +000033
34OPTIONS
35-------
36
Daniel Dunbar8f4a8a62012-05-08 16:50:35 +000037**-f**
Daniel Dunbar8f4a8a62012-05-08 16:50:35 +000038 Enable binary output on terminals. Normally, **llvm-as** will refuse to
39 write raw bitcode output if the output stream is a terminal. With this option,
40 **llvm-as** will write raw bitcode regardless of the output device.
41
Daniel Dunbar8f4a8a62012-05-08 16:50:35 +000042**-help**
Daniel Dunbar8f4a8a62012-05-08 16:50:35 +000043 Print a summary of command line options.
44
Daniel Dunbar8f4a8a62012-05-08 16:50:35 +000045**-o** *filename*
Daniel Dunbar8f4a8a62012-05-08 16:50:35 +000046 Specify the output file name. If *filename* is ``-``, then **llvm-as**
47 sends its output to standard output.
48
Daniel Dunbar8f4a8a62012-05-08 16:50:35 +000049EXIT STATUS
50-----------
51
Bill Wendling4a8948d2012-06-20 11:25:11 +000052If **llvm-as** succeeds, it will exit with 0. Otherwise, if an error occurs, it
53will exit with a non-zero value.
Daniel Dunbar8f4a8a62012-05-08 16:50:35 +000054
55SEE ALSO
56--------
57
Alex Brachet09a066b2019-07-04 21:19:05 +000058:manpage:`llvm-dis(1)`, as(1)