summaryrefslogtreecommitdiffstats
path: root/www/get_started.html
diff options
context:
space:
mode:
authorMatthijs Kooijman <matthijs@stdin.nl>2008-06-09 14:09:10 +0000
committerMatthijs Kooijman <matthijs@stdin.nl>2008-06-09 14:09:10 +0000
commitddf0cadce9cd6a715a399cc7c4df5d0b20a1d22c (patch)
treeace78897c5c7af7d17e2149526de87dd8b2eb349 /www/get_started.html
parent72a0e936436230f3e3c3c4d1bda30f94ef9b54d3 (diff)
Sprinkle some "-o -" clang options to make the examples work.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52145 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'www/get_started.html')
-rw-r--r--www/get_started.html10
1 files changed, 5 insertions, 5 deletions
diff --git a/www/get_started.html b/www/get_started.html
index fee467b714..23ad90f51b 100644
--- a/www/get_started.html
+++ b/www/get_started.html
@@ -93,9 +93,9 @@ is:</p>
href="http://llvm.org/docs/ProgrammersManual.html#ViewGraph">set up graphviz
and rebuild llvm first</a>)</li>
<li><tt>clang file.c -emit-llvm</tt> (print out unoptimized llvm code)</li>
- <li><tt>clang file.c -emit-llvm | llvm-as | opt -std-compile-opts |
+ <li><tt>clang file.c -emit-llvm -o - | llvm-as | opt -std-compile-opts |
llvm-dis</tt> (print out optimized llvm code)</li>
- <li><tt>clang file.c -emit-llvm | llvm-as | opt -std-compile-opts | llc
+ <li><tt>clang file.c -emit-llvm -o - | llvm-as | opt -std-compile-opts | llc
&gt; file.s</tt> (output native machine code)</li>
</ul>
</ol>
@@ -181,19 +181,19 @@ V foo(V a, V b) {
<h4>Code generation with LLVM:</h4>
<pre class="code">
-$ <b>clang ~/t.c -emit-llvm | llvm-as | opt -std-compile-opts | llvm-dis</b>
+$ <b>clang ~/t.c -emit-llvm -o - | llvm-as | opt -std-compile-opts | llvm-dis</b>
define &lt;4 x float&gt; @foo(&lt;4 x float&gt; %a, &lt;4 x float&gt; %b) {
entry:
%mul = mul &lt;4 x float&gt; %b, %a
%add = add &lt;4 x float&gt; %mul, %a
ret &lt;4 x float&gt; %add
}
-$ <b>clang ~/t.c -emit-llvm | llvm-as | opt -std-compile-opts | llc -march=ppc32 -mcpu=g5</b>
+$ <b>clang ~/t.c -emit-llvm -o - | llvm-as | opt -std-compile-opts | llc -march=ppc32 -mcpu=g5</b>
..
_foo:
vmaddfp v2, v3, v2, v2
blr
-$ <b>clang ~/t.c -emit-llvm | llvm-as | opt -std-compile-opts | llc -march=x86 -mcpu=yonah</b>
+$ <b>clang ~/t.c -emit-llvm -o - | llvm-as | opt -std-compile-opts | llc -march=x86 -mcpu=yonah</b>
..
_foo:
mulps %xmm0, %xmm1