blob: 7211206d300ff5aa744213c16a45a8fb46b020b5 [file] [log] [blame]
John Criswellecf32e52003-09-11 19:58:03 +00001<html>
2<title>
Chris Lattneree43b692003-09-25 19:50:05 +00003LLVM: llvm-dis tool
John Criswellecf32e52003-09-11 19:58:03 +00004</title>
5
Chris Lattner08a04fd2003-10-07 20:12:05 +00006<body bgcolor=white>
John Criswellecf32e52003-09-11 19:58:03 +00007
Chris Lattner26814d02003-10-07 20:17:24 +00008<center><h1>LLVM: <tt>llvm-dis</tt> tool</h1></center>
John Criswellecf32e52003-09-11 19:58:03 +00009<HR>
10
Chris Lattner26814d02003-10-07 20:17:24 +000011<h3>NAME</h3>
12<tt>llvm-dis</tt>
John Criswellecf32e52003-09-11 19:58:03 +000013
Chris Lattner26814d02003-10-07 20:17:24 +000014<h3>SYNOPSIS</h3>
15<tt>llvm-dis [options] [filename]</tt>
John Criswellecf32e52003-09-11 19:58:03 +000016
Chris Lattner26814d02003-10-07 20:17:24 +000017<h3>DESCRIPTION</h3>
John Criswellecf32e52003-09-11 19:58:03 +000018
Chris Lattner26814d02003-10-07 20:17:24 +000019The <tt>llvm-dis</tt> command is the LLVM disassembler. It takes an LLVM
20bytecode file and converts it into LLVM assembly language or C source code with
21equivalent functionality.
John Criswell67753922003-09-26 02:59:00 +000022<p>
John Criswellecf32e52003-09-11 19:58:03 +000023
Chris Lattner26814d02003-10-07 20:17:24 +000024If filename is omitted, <tt>llvm-dis</tt> reads its input from standard input.
John Criswell67753922003-09-26 02:59:00 +000025<p>
26
Chris Lattner26814d02003-10-07 20:17:24 +000027The default output file for <tt>llvm-dis</tt> is determined by the following logic:
John Criswell67753922003-09-26 02:59:00 +000028<ul>
29 <li>
Chris Lattner26814d02003-10-07 20:17:24 +000030 If the input is standard input or the file -, then the output is
31 standard output.
John Criswell67753922003-09-26 02:59:00 +000032 <p>
33
34 <li>
35 If the input filename ends in .bc, then the output filename will be
36 identical, except that the .bc suffix will be replaced by the .ll or .c
37 suffix (for LLVM assembly language and C code, respectively).
38 <p>
39
40 <li>
Chris Lattner26814d02003-10-07 20:17:24 +000041 If the input filename does not end in .bc, then the output filename will
42 be identical to the input filename, except that the .ll or .c suffix
43 will be appended to the filename (for LLVM assembly language and C code,
John Criswell67753922003-09-26 02:59:00 +000044 respectively).
45</ul>
46
Chris Lattner26814d02003-10-07 20:17:24 +000047<h3>OPTIONS</h3>
John Criswellecf32e52003-09-11 19:58:03 +000048
49<ul>
50 <li> -llvm
51 <br>
Chris Lattner26814d02003-10-07 20:17:24 +000052 Instruct <tt>llvm-dis</tt> to generate LLVM assembly code in human
53 readable format. This is the default behavior.
John Criswellecf32e52003-09-11 19:58:03 +000054 <p>
55
56 <li> -c
57 <br>
Chris Lattner26814d02003-10-07 20:17:24 +000058 Instruct <tt>llvm-dis</tt> to generate C source code.
John Criswellecf32e52003-09-11 19:58:03 +000059 <p>
60
61 <li> -f
62 <br>
Chris Lattner26814d02003-10-07 20:17:24 +000063 Force overwrite. Normally, <tt>llvm-dis</tt> will refuse to overwrite
64 an output file that already exists. With this option, <tt>llvm-dis</tt>
65 will overwrite the output file.
John Criswellecf32e52003-09-11 19:58:03 +000066 <p>
67
68 <li> -help
69 <br>
70 Print a summary of command line options.
71 <p>
72
73 <li> -o &lt;filename&gt;
74 <br>
Chris Lattner26814d02003-10-07 20:17:24 +000075 Specify the output filename. If filename is -, then the output is sent
76 to standard output.
John Criswellecf32e52003-09-11 19:58:03 +000077 <p>
78
John Criswell67753922003-09-26 02:59:00 +000079 <li> -time-passes
John Criswellecf32e52003-09-11 19:58:03 +000080 <br>
John Criswell67753922003-09-26 02:59:00 +000081 Record the amount of time needed for each pass and print it to standard
John Criswellecf32e52003-09-11 19:58:03 +000082 error.
83 <p>
84</ul>
85
Chris Lattner26814d02003-10-07 20:17:24 +000086<h3>EXIT STATUS</h3>
John Criswellecf32e52003-09-11 19:58:03 +000087
Chris Lattner26814d02003-10-07 20:17:24 +000088If <tt>llvm-dis</tt> succeeds, it will exit with 0. Otherwise, if an error
89occurs, it will exit with a non-zero value.
John Criswellecf32e52003-09-11 19:58:03 +000090
Chris Lattner26814d02003-10-07 20:17:24 +000091<h3>SEE ALSO</h3>
92
93<a href="llvm-as.html"><tt>llvm-as</tt></a>
John Criswellecf32e52003-09-11 19:58:03 +000094
95<HR>
Chris Lattner08a04fd2003-10-07 20:12:05 +000096Maintained by the <a href="http://llvm.cs.uiuc.edu">LLVM Team</a>.
John Criswellecf32e52003-09-11 19:58:03 +000097</body>
98</html>
99