Use correct syntax highliter in code blocks. Noticed by Sean Silva.
[oota-llvm.git] / docs / CommandGuide / llvm-as.rst
1 llvm-as - LLVM assembler
2 ========================
3
4
5 SYNOPSIS
6 --------
7
8
9 **llvm-as** [*options*] [*filename*]
10
11
12 DESCRIPTION
13 -----------
14
15
16 **llvm-as** is the LLVM assembler.  It reads a file containing human-readable
17 LLVM assembly language, translates it to LLVM bitcode, and writes the result
18 into a file or to standard output.
19
20 If *filename* is omitted or is ``-``, then **llvm-as** reads its input from
21 standard input.
22
23 If an output file is not specified with the **-o** option, then
24 **llvm-as** sends its output to a file or standard output by following
25 these rules:
26
27
28 \*
29
30  If the input is standard input, then the output is standard output.
31
32
33
34 \*
35
36  If the input is a file that ends with ``.ll``, then the output file is of
37  the same name, except that the suffix is changed to ``.bc``.
38
39
40
41 \*
42
43  If the input is a file that does not end with the ``.ll`` suffix, then the
44  output file has the same name as the input file, except that the ``.bc``
45  suffix is appended.
46
47
48
49
50 OPTIONS
51 -------
52
53
54
55 **-f**
56
57  Enable binary output on terminals.  Normally, **llvm-as** will refuse to
58  write raw bitcode output if the output stream is a terminal. With this option,
59  **llvm-as** will write raw bitcode regardless of the output device.
60
61
62
63 **-help**
64
65  Print a summary of command line options.
66
67
68
69 **-o** *filename*
70
71  Specify the output file name.  If *filename* is ``-``, then **llvm-as**
72  sends its output to standard output.
73
74
75
76
77 EXIT STATUS
78 -----------
79
80
81 If **llvm-as** succeeds, it will exit with 0.  Otherwise, if an error
82 occurs, it will exit with a non-zero value.
83
84
85 SEE ALSO
86 --------
87
88
89 llvm-dis|llvm-dis, gccas|gccas