[llvm-commits] [llvm] r91595 - /llvm/trunk/docs/CompilerDriver.html

Mikhail Glushenkov foldr at codedgers.com
Wed Dec 16 23:49:26 PST 2009


Author: foldr
Date: Thu Dec 17 01:49:26 2009
New Revision: 91595

URL: http://llvm.org/viewvc/llvm-project?rev=91595&view=rev
Log:
Regenerate.

Modified:
    llvm/trunk/docs/CompilerDriver.html

Modified: llvm/trunk/docs/CompilerDriver.html
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/CompilerDriver.html?rev=91595&r1=91594&r2=91595&view=diff

==============================================================================
--- llvm/trunk/docs/CompilerDriver.html (original)
+++ llvm/trunk/docs/CompilerDriver.html Thu Dec 17 01:49:26 2009
@@ -334,8 +334,8 @@
 only for list options in conjunction with <tt class="docutils literal"><span class="pre">multi_val</span></tt>; for ordinary lists
 it is synonymous with <tt class="docutils literal"><span class="pre">required</span></tt>. Incompatible with <tt class="docutils literal"><span class="pre">required</span></tt> and
 <tt class="docutils literal"><span class="pre">zero_or_one</span></tt>.</li>
-<li><tt class="docutils literal"><span class="pre">zero_or_one</span></tt> - the option can be specified zero or one times. Useful
-only for list options in conjunction with <tt class="docutils literal"><span class="pre">multi_val</span></tt>. Incompatible with
+<li><tt class="docutils literal"><span class="pre">optional</span></tt> - the option can be specified zero or one times. Useful only
+for list options in conjunction with <tt class="docutils literal"><span class="pre">multi_val</span></tt>. Incompatible with
 <tt class="docutils literal"><span class="pre">required</span></tt> and <tt class="docutils literal"><span class="pre">one_or_more</span></tt>.</li>
 <li><tt class="docutils literal"><span class="pre">hidden</span></tt> - the description of this option will not appear in
 the <tt class="docutils literal"><span class="pre">--help</span></tt> output (but will appear in the <tt class="docutils literal"><span class="pre">--help-hidden</span></tt>
@@ -350,13 +350,14 @@
 <li><tt class="docutils literal"><span class="pre">multi_val</span> <span class="pre">n</span></tt> - this option takes <em>n</em> arguments (can be useful in some
 special cases). Usage example: <tt class="docutils literal"><span class="pre">(parameter_list_option</span> <span class="pre">"foo",</span> <span class="pre">(multi_val</span>
 <span class="pre">3))</span></tt>; the command-line syntax is '-foo a b c'. Only list options can have
-this attribute; you can, however, use the <tt class="docutils literal"><span class="pre">one_or_more</span></tt>, <tt class="docutils literal"><span class="pre">zero_or_one</span></tt>
+this attribute; you can, however, use the <tt class="docutils literal"><span class="pre">one_or_more</span></tt>, <tt class="docutils literal"><span class="pre">optional</span></tt>
 and <tt class="docutils literal"><span class="pre">required</span></tt> properties.</li>
 <li><tt class="docutils literal"><span class="pre">init</span></tt> - this option has a default value, either a string (if it is a
-parameter), or a boolean (if it is a switch; boolean constants are called
-<tt class="docutils literal"><span class="pre">true</span></tt> and <tt class="docutils literal"><span class="pre">false</span></tt>). List options can't have this attribute. Usage
-examples: <tt class="docutils literal"><span class="pre">(switch_option</span> <span class="pre">"foo",</span> <span class="pre">(init</span> <span class="pre">true))</span></tt>; <tt class="docutils literal"><span class="pre">(prefix_option</span> <span class="pre">"bar",</span>
-<span class="pre">(init</span> <span class="pre">"baz"))</span></tt>.</li>
+parameter), or a boolean (if it is a switch; as in C++, boolean constants
+are called <tt class="docutils literal"><span class="pre">true</span></tt> and <tt class="docutils literal"><span class="pre">false</span></tt>). List options can't have <tt class="docutils literal"><span class="pre">init</span></tt>
+attribute.
+Usage examples: <tt class="docutils literal"><span class="pre">(switch_option</span> <span class="pre">"foo",</span> <span class="pre">(init</span> <span class="pre">true))</span></tt>; <tt class="docutils literal"><span class="pre">(prefix_option</span>
+<span class="pre">"bar",</span> <span class="pre">(init</span> <span class="pre">"baz"))</span></tt>.</li>
 <li><tt class="docutils literal"><span class="pre">extern</span></tt> - this option is defined in some other plugin, see <a class="reference internal" href="#extern">below</a>.</li>
 </ul>
 </blockquote>
@@ -604,10 +605,10 @@
 $ llvmc hello.cpp
 llvmc: Unknown suffix: cpp
 </pre>
-<p>The language map entries should be added only for tools that are
-linked with the root node. Since tools are not allowed to have
-multiple output languages, for nodes "inside" the graph the input and
-output languages should match. This is enforced at compile-time.</p>
+<p>The language map entries are needed only for the tools that are linked from the
+root node. Since a tool can't have multiple output languages, for inner nodes of
+the graph the input and output languages should match. This is enforced at
+compile-time.</p>
 </div>
 <div class="section" id="option-preprocessor">
 <h1><a class="toc-backref" href="#id20">Option preprocessor</a></h1>
@@ -619,22 +620,28 @@
 occasions. Example (adapted from the built-in Base plugin):</p>
 <pre class="literal-block">
 def Preprocess : OptionPreprocessor<
-(case (and (switch_on "O3"), (any_switch_on ["O0", "O1", "O2"])),
-           [(unset_option ["O0", "O1", "O2"]),
-            (warning "Multiple -O options specified, defaulted to -O3.")],
+(case (not (any_switch_on ["O0", "O1", "O2", "O3"])),
+           (set_option "O2"),
+      (and (switch_on "O3"), (any_switch_on ["O0", "O1", "O2"])),
+           (unset_option ["O0", "O1", "O2"]),
       (and (switch_on "O2"), (any_switch_on ["O0", "O1"])),
            (unset_option ["O0", "O1"]),
       (and (switch_on "O1"), (switch_on "O0")),
            (unset_option "O0"))
 >;
 </pre>
-<p>Here, <tt class="docutils literal"><span class="pre">OptionPreprocessor</span></tt> is used to unset all spurious optimization options
-(so that they are not forwarded to the compiler).</p>
+<p>Here, <tt class="docutils literal"><span class="pre">OptionPreprocessor</span></tt> is used to unset all spurious <tt class="docutils literal"><span class="pre">-O</span></tt> options so
+that they are not forwarded to the compiler. If no optimization options are
+specified, <tt class="docutils literal"><span class="pre">-O2</span></tt> is enabled.</p>
 <p><tt class="docutils literal"><span class="pre">OptionPreprocessor</span></tt> is basically a single big <tt class="docutils literal"><span class="pre">case</span></tt> expression, which is
 evaluated only once right after the plugin is loaded. The only allowed actions
-in <tt class="docutils literal"><span class="pre">OptionPreprocessor</span></tt> are <tt class="docutils literal"><span class="pre">error</span></tt>, <tt class="docutils literal"><span class="pre">warning</span></tt> and a special action
-<tt class="docutils literal"><span class="pre">unset_option</span></tt>, which, as the name suggests, unsets a given option. For
-convenience, <tt class="docutils literal"><span class="pre">unset_option</span></tt> also works on lists.</p>
+in <tt class="docutils literal"><span class="pre">OptionPreprocessor</span></tt> are <tt class="docutils literal"><span class="pre">error</span></tt>, <tt class="docutils literal"><span class="pre">warning</span></tt> and two special actions:
+<tt class="docutils literal"><span class="pre">unset_option</span></tt> and <tt class="docutils literal"><span class="pre">set_option</span></tt>. As their names suggest, they can be used to
+set or unset a given option. To set a parameter option with <tt class="docutils literal"><span class="pre">set_option</span></tt>, use
+the two-argument form: <tt class="docutils literal"><span class="pre">(set_option</span> <span class="pre">"parameter",</span> <span class="pre">"value")</span></tt>. For convenience,
+<tt class="docutils literal"><span class="pre">set_option</span></tt> and <tt class="docutils literal"><span class="pre">unset_option</span></tt> also work on lists (that is, instead of
+<tt class="docutils literal"><span class="pre">[(unset_option</span> <span class="pre">"A"),</span> <span class="pre">(unset_option</span> <span class="pre">"B")]</span></tt> you can use <tt class="docutils literal"><span class="pre">(unset_option</span> <span class="pre">["A",</span>
+<span class="pre">"B"])</span></tt>).</p>
 </div>
 <div class="section" id="more-advanced-topics">
 <h1><a class="toc-backref" href="#id21">More advanced topics</a></h1>





More information about the llvm-commits mailing list