Add comments.
[oota-llvm.git] / docs / FAQ.html
index d62ffd715ab8fcaa9e94418e50e121ec448716ce..7294cdd1a4294bbdafc5cdb142202b13d1dbe3e9 100644 (file)
@@ -12,9 +12,9 @@
 </head>
 <body>
 
-<div class="doc_title">
+<h1>
   LLVM: Frequently Asked Questions
-</div>
+</h1>
 
 <ol>
   <li><a href="#license">License</a>
@@ -72,9 +72,6 @@
     <li>After Subversion update, rebuilding gives the error "No rule to make
         target".</li>
 
-    <li><a href="#llvmc">The <tt>llvmc</tt> program gives me errors/doesn't
-        work.</a></li>
-
     <li><a href="#srcdir-objdir">When I compile LLVM-GCC with srcdir == objdir,
         it fails. Why?</a></li>
   </ol></li>
 </ol>
 
 <div class="doc_author">
-  <p>Written by <a href="http://llvm.org">The LLVM Team</a></p>
+  <p>Written by <a href="http://llvm.org/">The LLVM Team</a></p>
 </div>
 
 
 <!-- *********************************************************************** -->
-<div class="doc_section">
+<h2>
   <a name="license">License</a>
-</div>
+</h2>
 <!-- *********************************************************************** -->
 
 <div class="question">
 </div>
 
 <!-- *********************************************************************** -->
-<div class="doc_section">
+<h2>
   <a name="source">Source Code</a>
-</div>
+</h2>
 <!-- *********************************************************************** -->
 
 <div class="question">
@@ -227,9 +224,9 @@ LLVM have been ported to a plethora of platforms.</p>
 </div>
 
 <!-- *********************************************************************** -->
-<div class="doc_section">
+<h2>
   <a name="build">Build Problems</a>
-</div>
+</h2>
 <!-- *********************************************************************** -->
 
 <div class="question">
@@ -419,16 +416,6 @@ Stop.
    rebuilding.</p>
 </div>
 
-<div class="question">
-<p><a name="llvmc">The <tt>llvmc</tt> program gives me errors/doesn't
-   work.</a></p>
-</div>
-
-<div class="answer">
-<p><tt>llvmc</tt> is experimental and isn't really supported. We suggest
-   using <tt>llvm-gcc</tt> instead.</p>
-</div>
-
 <div class="question">
 <p><a name="srcdir-objdir">When I compile LLVM-GCC with srcdir == objdir, it
    fails. Why?</a></p>
@@ -437,7 +424,7 @@ Stop.
 <div class="answer">
 <p>The <tt>GNUmakefile</tt> in the top-level directory of LLVM-GCC is a special
    <tt>Makefile</tt> used by Apple to invoke the <tt>build_gcc</tt> script after
-   setting up a special environment. This has the unforunate side-effect that
+   setting up a special environment. This has the unfortunate side-effect that
    trying to build LLVM-GCC with srcdir == objdir in a "non-Apple way" invokes
    the <tt>GNUmakefile</tt> instead of <tt>Makefile</tt>. Because the
    environment isn't set up correctly to do this, the build fails.</p>
@@ -449,7 +436,9 @@ Stop.
 </div>
 
 <!-- *********************************************************************** -->
-<div class="doc_section"><a name="felangs">Source Languages</a></div>
+<h2>
+  <a name="felangs">Source Languages</a>
+</h2>
 
 <div class="question">
 <p><a name="langs">What source languages are supported?</a></p>
@@ -538,10 +527,7 @@ Stop.
 <p>Currently, there isn't much. LLVM supports an intermediate representation
    which is useful for code representation but will not support the high level
    (abstract syntax tree) representation needed by most compilers. There are no
-   facilities for lexical nor semantic analysis. There is, however, a <i>mostly
-   implemented</i> configuration-driven
-   <a href="CompilerDriver.html">compiler driver</a> which simplifies the task
-   of running optimizations, linking, and executable generation.</p>
+   facilities for lexical nor semantic analysis.</p>
 </div>
 
 <div class="question">
@@ -555,9 +541,9 @@ Stop.
 </div>
 
 <!-- *********************************************************************** -->
-<div class="doc_section">
+<h2>
   <a name="cfe">Using the GCC Front End</a>
-</div>
+</h2>
 
 <div class="question">
 <p>When I compile software that uses a configure script, the configure script
@@ -632,22 +618,22 @@ Stop.
 <p>Use commands like this:</p>
 
 <ol>
-  <li><p>Compile your program as normal with llvm-g++:</p>
+  <li><p>Compile your program with llvm-g++:</p>
 
 <pre class="doc_code">
-% llvm-g++ x.cpp -o program
+% llvm-g++ -emit-llvm x.cpp -o program.bc -c
 </pre>
 
       <p>or:</p>
 
 <pre class="doc_code">
-% llvm-g++ a.cpp -c
-% llvm-g++ b.cpp -c
-% llvm-g++ a.o b.o -o program
+% llvm-g++ a.cpp -c -emit-llvm
+% llvm-g++ b.cpp -c -emit-llvm
+% llvm-ld a.o b.o -o program
 </pre>
 
-      <p>With llvm-gcc3, this will generate program and program.bc.  The .bc
-         file is the LLVM version of the program all linked together.</p></li>
+   <p>This will generate program and program.bc.  The .bc
+      file is the LLVM version of the program all linked together.</p></li>
 
   <li><p>Convert the LLVM code to C code, using the LLC tool with the C
       backend:</p>
@@ -659,7 +645,7 @@ Stop.
   <li><p>Finally, compile the C file:</p>
 
 <pre class="doc_code">
-% cc x.c
+% cc x.c -lstdc++
 </pre></li>
 
 </ol>
@@ -712,9 +698,9 @@ Stop.
 </div>
 
 <!-- *********************************************************************** -->
-<div class="doc_section">
+<h2>
   <a name="cfe_code">Questions about code generated by the GCC front-end</a>
-</div>
+</h2>
 
 <div class="question">
 <p><a name="iosinit">What is this <tt>llvm.global_ctors</tt> and
@@ -803,7 +789,7 @@ define fastcc void @foo() {
         ret void
 }
 define void @bar() {
-        call void @foo( )
+        call void @foo()
         ret void
 }
 </pre>
@@ -930,7 +916,7 @@ F.i:
   <a href="http://validator.w3.org/check/referer"><img
   src="http://www.w3.org/Icons/valid-html401-blue" alt="Valid HTML 4.01"></a>
 
-  <a href="http://llvm.org">LLVM Compiler Infrastructure</a><br>
+  <a href="http://llvm.org/">LLVM Compiler Infrastructure</a><br>
   Last modified: $Date$
 </address>