Daniel Dunbar | 8f4a8a6 | 2012-05-08 16:50:35 +0000 | [diff] [blame] | 1 | llvm-as - LLVM assembler |
| 2 | ======================== |
| 3 | |
James Henderson | a056684 | 2019-06-27 13:24:46 +0000 | [diff] [blame] | 4 | .. program:: llvm-as |
| 5 | |
Daniel Dunbar | 8f4a8a6 | 2012-05-08 16:50:35 +0000 | [diff] [blame] | 6 | SYNOPSIS |
| 7 | -------- |
| 8 | |
Daniel Dunbar | 8f4a8a6 | 2012-05-08 16:50:35 +0000 | [diff] [blame] | 9 | **llvm-as** [*options*] [*filename*] |
| 10 | |
Daniel Dunbar | 8f4a8a6 | 2012-05-08 16:50:35 +0000 | [diff] [blame] | 11 | DESCRIPTION |
| 12 | ----------- |
| 13 | |
Daniel Dunbar | 8f4a8a6 | 2012-05-08 16:50:35 +0000 | [diff] [blame] | 14 | **llvm-as** is the LLVM assembler. It reads a file containing human-readable |
| 15 | LLVM assembly language, translates it to LLVM bitcode, and writes the result |
| 16 | into a file or to standard output. |
| 17 | |
| 18 | If *filename* is omitted or is ``-``, then **llvm-as** reads its input from |
| 19 | standard input. |
| 20 | |
| 21 | If 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 |
| 23 | these rules: |
| 24 | |
Bill Wendling | 4a8948d | 2012-06-20 11:25:11 +0000 | [diff] [blame] | 25 | * If the input is standard input, then the output is standard output. |
Daniel Dunbar | 8f4a8a6 | 2012-05-08 16:50:35 +0000 | [diff] [blame] | 26 | |
Bill Wendling | 4a8948d | 2012-06-20 11:25:11 +0000 | [diff] [blame] | 27 | * 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 Dunbar | 8f4a8a6 | 2012-05-08 16:50:35 +0000 | [diff] [blame] | 29 | |
Bill Wendling | 4a8948d | 2012-06-20 11:25:11 +0000 | [diff] [blame] | 30 | * 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 Dunbar | 8f4a8a6 | 2012-05-08 16:50:35 +0000 | [diff] [blame] | 33 | |
| 34 | OPTIONS |
| 35 | ------- |
| 36 | |
Daniel Dunbar | 8f4a8a6 | 2012-05-08 16:50:35 +0000 | [diff] [blame] | 37 | **-f** |
Daniel Dunbar | 8f4a8a6 | 2012-05-08 16:50:35 +0000 | [diff] [blame] | 38 | 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 Dunbar | 8f4a8a6 | 2012-05-08 16:50:35 +0000 | [diff] [blame] | 42 | **-help** |
Daniel Dunbar | 8f4a8a6 | 2012-05-08 16:50:35 +0000 | [diff] [blame] | 43 | Print a summary of command line options. |
| 44 | |
Daniel Dunbar | 8f4a8a6 | 2012-05-08 16:50:35 +0000 | [diff] [blame] | 45 | **-o** *filename* |
Daniel Dunbar | 8f4a8a6 | 2012-05-08 16:50:35 +0000 | [diff] [blame] | 46 | Specify the output file name. If *filename* is ``-``, then **llvm-as** |
| 47 | sends its output to standard output. |
| 48 | |
Daniel Dunbar | 8f4a8a6 | 2012-05-08 16:50:35 +0000 | [diff] [blame] | 49 | EXIT STATUS |
| 50 | ----------- |
| 51 | |
Bill Wendling | 4a8948d | 2012-06-20 11:25:11 +0000 | [diff] [blame] | 52 | If **llvm-as** succeeds, it will exit with 0. Otherwise, if an error occurs, it |
| 53 | will exit with a non-zero value. |
Daniel Dunbar | 8f4a8a6 | 2012-05-08 16:50:35 +0000 | [diff] [blame] | 54 | |
| 55 | SEE ALSO |
| 56 | -------- |
| 57 | |
Alex Brachet | 09a066b | 2019-07-04 21:19:05 +0000 | [diff] [blame] | 58 | :manpage:`llvm-dis(1)`, as(1) |