diff options
27 files changed, 2 insertions, 6080 deletions
diff --git a/docs/CommandGuide/index.html b/docs/CommandGuide/index.html index b839d3cb32..6f217db4d0 100644 --- a/docs/CommandGuide/index.html +++ b/docs/CommandGuide/index.html @@ -69,9 +69,6 @@ options) arguments to the tool you are interested in.</p> <li><a href="/cmds/llvm-config.html"><b>llvm-config</b></a> - print out LLVM compilation options, libraries, etc. as configured</li> -<li><a href="/cmds/llvmc.html"><b>llvmc</b></a> - - a generic customizable compiler driver</li> - <li><a href="/cmds/llvm-diff.html"><b>llvm-diff</b></a> - structurally compare two modules</li> diff --git a/docs/CommandGuide/llvmc.pod b/docs/CommandGuide/llvmc.pod deleted file mode 100644 index 95a9e5ef36..0000000000 --- a/docs/CommandGuide/llvmc.pod +++ /dev/null @@ -1,190 +0,0 @@ -=pod - -=head1 NAME - -llvmc - The LLVM Compiler Driver (WIP) - -=head1 SYNOPSIS - -B<llvmc> [I<options>] I<filenames...> - -=head1 DESCRIPTION - -B<llvmc> is a configurable driver for invoking other LLVM (and non-LLVM) tools -in order to compile, optimize and link software for multiple languages. For -those familiar with FSF's B<gcc> tool, it is very similar. Please note that -B<llvmc> is considered an experimental tool. - -=head1 OPTIONS - -=head2 Built-in Options - -LLVMC has some built-in options that can't be overridden in the -configuration libraries. - -=over - -=item B<-o> I<filename> - -Output file name. - -=item B<-x> I<language> - -Specify the language of the following input files until the next B<-x> -option. - -=item B<-load> I<plugin_name> - -Load the specified plugin DLL. Example: -S<-load $LLVM_DIR/Release/lib/LLVMCSimple.so>. - -=item B<-v> or B<--verbose> - -Enable verbose mode, i.e. print out all executed commands. - -=item B<--check-graph> - -Check the compilation for common errors like mismatched output/input language -names, multiple default edges and cycles. Because of plugins, these checks can't -be performed at compile-time. Exit with code zero if no errors were found, and -return the number of found errors otherwise. Hidden option, useful for debugging -LLVMC plugins. - -=item B<--view-graph> - -Show a graphical representation of the compilation graph and exit. Requires that -you have I<dot> and I<gv> programs installed. Hidden option, useful for -debugging LLVMC plugins. - -=item B<--write-graph> - -Write a I<compilation-graph.dot> file in the current directory with the -compilation graph description in Graphviz format (identical to the file used by -the B<--view-graph> option). The B<-o> option can be used to set the output file -name. Hidden option, useful for debugging LLVMC plugins. - -=item B<--save-temps> - -Write temporary files to the current directory and do not delete them on -exit. This option can also take an argument: the I<--save-temps=obj> switch will -write files into the directory specified with the I<-o> option. The -I<--save-temps=cwd> and I<--save-temps> switches are both synonyms for the -default behaviour. - -=item B<--temp-dir> I<directory> - -Store temporary files in the given directory. This directory is deleted on exit -unless I<--save-temps> is specified. If I<--save-temps=obj> is also specified, -I<--temp-dir> is given the precedence. - -=item B<-help> - -Print a summary of command-line options and exit. - -=item B<-help-hidden> - -Print a summary of command-line options and exit. Print help even for -options intended for developers. - -=item B<--version> - -Print version information and exit. - -=item B<@>I<file> - -Read command-line options from I<file>. The options read are inserted -in place of the original @I<file> option. If I<file> does not exist, or -cannot be read, then the option will be treated literally, and not -removed. - -Options in I<file> are separated by whitespace. A whitespace character -may be included in an option by surrounding the entire option in -either single or double quotes. Any character (including a backslash) -may be included by prefixing the character to be included with a -backslash. The file may itself contain additional @I<file> options; -any such options will be processed recursively. - - -=back - - -=head2 Control Options - -By default, LLVMC is built with some standard configuration libraries -that define the following options: - -=over - -=item B<-clang> - -Use Clang instead of llvm-gcc. - -=item B<-opt> - -Enable optimization passes with B<opt>. To pass options to the B<opt> program -use the B<-Wo,> option. - -=item B<-I> I<directory> - -Add a directory to the header file search path. - -=item B<-L> I<directory> - -Add I<directory> to the library search path. - -=item B<-F> I<directory> - -Add I<directory> to the framework search path. - -=item B<-l>I<name> - -Link in the library libI<name>.[bc | a | so]. This library should -be a bitcode library. - -=item B<-framework> I<name> - -Link in the library libI<name>.[bc | a | so]. This library should -be a bitcode library. - -=item B<-emit-llvm> - -Output LLVM bitcode (with B<-c>) or assembly (with B<-S>) instead of native -object (or assembly). If B<-emit-llvm> is given without either B<-c> or B<-S> -it has no effect. - -=item B<-Wa> - -Pass options to assembler. - -=item B<-Wl> - -Pass options to linker. - -=item B<-Wo> - -Pass options to opt. - -=item B<-Wllc> - -Pass options to llc (code generator). - -=back - -=head1 EXIT STATUS - -If B<llvmc> succeeds, it will exit with code 0. Otherwise, if an -error occurs, it will exit with a non-zero value. If one of the -compilation tools returns a non-zero status, pending actions will be -discarded and B<llvmc> will return the same result code as the failing -compilation tool. - -=head1 SEE ALSO - -L<llvm-gcc|llvmgcc>, L<llvm-g++|llvmgxx>, L<llvm-as|llvm-as>, -L<llvm-dis|llvm-dis>, L<llc|llc>, L<llvm-link|llvm-link> - -=head1 AUTHORS - -Maintained by the LLVM Team (L<http://llvm.org/>). - -=cut diff --git a/docs/CompilerDriver.html b/docs/CompilerDriver.html deleted file mode 100644 index 0f5d3592a2..0000000000 --- a/docs/CompilerDriver.html +++ /dev/null @@ -1,687 +0,0 @@ -<?xml version="1.0" encoding="utf-8" ?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<meta name="generator" content="Docutils 0.6: http://docutils.sourceforge.net/" /> -<title>Customizing LLVMC: Reference Manual</title> -<link rel="stylesheet" href="llvm.css" type="text/css" /> -</head> -<body> -<div class="document" id="customizing-llvmc-reference-manual"> -<h1 class="title">Customizing LLVMC: Reference Manual</h1> - -<!-- This file was automatically generated by rst2html. -Please do not edit directly! -The ReST source lives in the directory 'tools/llvmc/doc'. --> -<div class="contents topic" id="contents"> -<p class="topic-title first">Contents</p> -<ul class="simple"> -<li><a class="reference internal" href="#introduction" id="id7">Introduction</a></li> -<li><a class="reference internal" href="#compiling-with-llvmc" id="id8">Compiling with <tt class="docutils literal">llvmc</tt></a></li> -<li><a class="reference internal" href="#predefined-options" id="id9">Predefined options</a></li> -<li><a class="reference internal" href="#compiling-llvmc-based-drivers" id="id10">Compiling LLVMC-based drivers</a></li> -<li><a class="reference internal" href="#customizing-llvmc-the-compilation-graph" id="id11">Customizing LLVMC: the compilation graph</a></li> -<li><a class="reference internal" href="#describing-options" id="id12">Describing options</a></li> -<li><a class="reference internal" href="#conditional-evaluation" id="id13">Conditional evaluation</a></li> -<li><a class="reference internal" href="#writing-a-tool-description" id="id14">Writing a tool description</a><ul> -<li><a class="reference internal" href="#id4" id="id15">Actions</a></li> -</ul> -</li> -<li><a class="reference internal" href="#language-map" id="id16">Language map</a></li> -<li><a class="reference internal" href="#option-preprocessor" id="id17">Option preprocessor</a></li> -<li><a class="reference internal" href="#more-advanced-topics" id="id18">More advanced topics</a><ul> -<li><a class="reference internal" href="#hooks-and-environment-variables" id="id19">Hooks and environment variables</a></li> -<li><a class="reference internal" href="#debugging" id="id20">Debugging</a></li> -<li><a class="reference internal" href="#conditioning-on-the-executable-name" id="id21">Conditioning on the executable name</a></li> -</ul> -</li> -</ul> -</div> -<div class="doc_author"> -<p>Written by <a href="mailto:foldr@codedgers.com">Mikhail Glushenkov</a></p> -</div><div class="section" id="introduction"> -<h1><a class="toc-backref" href="#id7">Introduction</a></h1> -<p>LLVMC is a generic compiler driver, designed to be customizable and -extensible. It plays the same role for LLVM as the <tt class="docutils literal">gcc</tt> program does for -GCC - LLVMC's job is essentially to transform a set of input files into a set of -targets depending on configuration rules and user options. What makes LLVMC -different is that these transformation rules are completely customizable - in -fact, LLVMC knows nothing about the specifics of transformation (even the -command-line options are mostly not hard-coded) and regards the transformation -structure as an abstract graph. The structure of this graph is described in -high-level TableGen code, from which an efficient C++ representation is -automatically derived. This makes it possible to adapt LLVMC for other -purposes - for example, as a build tool for game resources.</p> -<p>Because LLVMC employs <a class="reference external" href="http://llvm.org/docs/TableGenFundamentals.html">TableGen</a> as its configuration language, you -need to be familiar with it to customize LLVMC.</p> -</div> -<div class="section" id="compiling-with-llvmc"> -<h1><a class="toc-backref" href="#id8">Compiling with <tt class="docutils literal">llvmc</tt></a></h1> -<p>LLVMC tries hard to be as compatible with <tt class="docutils literal">gcc</tt> as possible, -although there are some small differences. Most of the time, however, -you shouldn't be able to notice them:</p> -<pre class="literal-block"> -$ # This works as expected: -$ llvmc -O3 -Wall hello.cpp -$ ./a.out -hello -</pre> -<p>One nice feature of LLVMC is that one doesn't have to distinguish between -different compilers for different languages (think <tt class="docutils literal">g++</tt> vs. <tt class="docutils literal">gcc</tt>) - the -right toolchain is chosen automatically based on input language names (which -are, in turn, determined from file extensions). If you want to force files -ending with ".c" to compile as C++, use the <tt class="docutils literal"><span class="pre">-x</span></tt> option, just like you would -do it with <tt class="docutils literal">gcc</tt>:</p> -<pre class="literal-block"> -$ # hello.c is really a C++ file -$ llvmc -x c++ hello.c -$ ./a.out -hello -</pre> -<p>On the other hand, when using LLVMC as a linker to combine several C++ -object files you should provide the <tt class="docutils literal"><span class="pre">--linker</span></tt> option since it's -impossible for LLVMC to choose the right linker in that case:</p> -<pre class="literal-block"> -$ llvmc -c hello.cpp -$ llvmc hello.o -[A lot of link-time errors skipped] -$ llvmc --linker=c++ hello.o -$ ./a.out -hello -</pre> -<p>By default, LLVMC uses <tt class="docutils literal"><span class="pre">llvm-gcc</span></tt> to compile the source code. It is also -possible to choose the <tt class="docutils literal">clang</tt> compiler with the <tt class="docutils literal"><span class="pre">-clang</span></tt> option.</p> -</div> -<div class="section" id="predefined-options"> -<h1><a class="toc-backref" href="#id9">Predefined options</a></h1> -<p>LLVMC has some built-in options that can't be overridden in the TableGen code:</p> -<ul class="simple"> -<li><tt class="docutils literal"><span class="pre">-o</span> FILE</tt> - Output file name.</li> -<li><tt class="docutils literal"><span class="pre">-x</span> LANGUAGE</tt> - Specify the language of the following input files -until the next -x option.</li> -<li><tt class="docutils literal"><span class="pre">-v</span></tt> - Enable verbose mode, i.e. print out all executed commands.</li> -<li><tt class="docutils literal"><span class="pre">--save-temps</span></tt> - Write temporary files to the current directory and do not -delete them on exit. This option can also take an argument: the -<tt class="docutils literal"><span class="pre">--save-temps=obj</span></tt> switch will write files into the directory specified with -the <tt class="docutils literal"><span class="pre">-o</span></tt> option. The <tt class="docutils literal"><span class="pre">--save-temps=cwd</span></tt> and <tt class="docutils literal"><span class="pre">--save-temps</span></tt> switches are -both synonyms for the default behaviour.</li> -<li><tt class="docutils literal"><span class="pre">--temp-dir</span> DIRECTORY</tt> - Store temporary files in the given directory. This -directory is deleted on exit unless <tt class="docutils literal"><span class="pre">--save-temps</span></tt> is specified. If -<tt class="docutils literal"><span class="pre">--save-temps=obj</span></tt> is also specified, <tt class="docutils literal"><span class="pre">--temp-dir</span></tt> is given the -precedence.</li> -<li><tt class="docutils literal"><span class="pre">--check-graph</span></tt> - Check the compilation for common errors like mismatched -output/input language names, multiple default edges and cycles. Exit with code -zero if no errors were found, and return the number of found errors -otherwise. Hidden option, useful for debugging.</li> -<li><tt class="docutils literal"><span class="pre">--view-graph</span></tt> - Show a graphical representation of the compilation graph -and exit. Requires that you have <tt class="docutils literal">dot</tt> and <tt class="docutils literal">gv</tt> programs installed. Hidden -option, useful for debugging.</li> -<li><tt class="docutils literal"><span class="pre">--write-graph</span></tt> - Write a <tt class="docutils literal"><span class="pre">compilation-graph.dot</span></tt> file in the current -directory with the compilation graph description in Graphviz format (identical -to the file used by the <tt class="docutils literal"><span class="pre">--view-graph</span></tt> option). The <tt class="docutils literal"><span class="pre">-o</span></tt> option can be -used to set the output file name. Hidden option, useful for debugging.</li> -<li><tt class="docutils literal"><span class="pre">--help</span></tt>, <tt class="docutils literal"><span class="pre">--help-hidden</span></tt>, <tt class="docutils literal"><span class="pre">--version</span></tt> - These options have -their standard meaning.</li> -</ul> -</div> -<div class="section" id="compiling-llvmc-based-drivers"> -<h1><a class="toc-backref" href="#id10">Compiling LLVMC-based drivers</a></h1> -<p>It's easiest to start working on your own LLVMC driver by copying the skeleton -project which lives under <tt class="docutils literal">$LLVMC_DIR/examples/Skeleton</tt>:</p> -<pre class="literal-block"> -$ cd $LLVMC_DIR/examples -$ cp -r Skeleton MyDriver -$ cd MyDriver -$ ls -AutoGenerated.td Hooks.cpp Main.cpp Makefile -</pre> -<p>As you can see, our basic driver consists of only three files (not counting the -build script). <tt class="docutils literal">AutoGenerated.td</tt> contains TableGen description of the -compilation graph; its format is documented in the following -sections. <tt class="docutils literal">Hooks.cpp</tt> is an empty file that should be used for hook -definitions (see <a class="reference internal" href="#hooks">below</a>). <tt class="docutils literal">Main.cpp</tt> is just a helper used to compile the -auto-generated C++ code produced from TableGen source.</p> -<p>The first thing that you should do is to change the <tt class="docutils literal">LLVMC_BASED_DRIVER</tt> -variable in the <tt class="docutils literal">Makefile</tt>:</p> -<pre class="literal-block"> -LLVMC_BASED_DRIVER=MyDriver -</pre> -<p>It can also be a good idea to put your TableGen code into a file with a less -generic name:</p> -<pre class="literal-block"> -$ touch MyDriver.td -$ vim AutoGenerated.td -[...] -include "MyDriver.td" -</pre> -<p>If you have more than one TableGen source file, they all should be included from -<tt class="docutils literal">AutoGenerated.td</tt>, since this file is used by the build system to generate -C++ code.</p> -<p>To build your driver, just <tt class="docutils literal">cd</tt> to its source directory and run <tt class="docutils literal">make</tt>. The -resulting executable will be put into <tt class="docutils literal"><span class="pre">$LLVM_OBJ_DIR/$(BuildMode)/bin</span></tt>.</p> -<p>If you're compiling LLVM with different source and object directories, then you -must perform the following additional steps before running <tt class="docutils literal">make</tt>:</p> -<pre class="literal-block"> -# LLVMC_SRC_DIR = $LLVM_SRC_DIR/tools/llvmc/ -# LLVMC_OBJ_DIR = $LLVM_OBJ_DIR/tools/llvmc/ -$ mkdir $LLVMC_OBJ_DIR/examples/MyDriver/ -$ cp $LLVMC_SRC_DIR/examples/MyDriver/Makefile \ - $LLVMC_OBJ_DIR/examples/MyDriver/ -$ cd $LLVMC_OBJ_DIR/examples/MyDriver -$ make -</pre> -</div> -<div class="section" id="customizing-llvmc-the-compilation-graph"> -<h1><a class="toc-backref" href="#id11">Customizing LLVMC: the compilation graph</a></h1> -<p>Each TableGen configuration file should include the common definitions:</p> -<pre class="literal-block"> -include "llvm/CompilerDriver/Common.td" -</pre> -<p>Internally, LLVMC stores information about possible source transformations in -form of a graph. Nodes in this graph represent tools, and edges between two -nodes represent a transformation path. A special "root" node is used to mark -entry points for the transformations. LLVMC also assigns a weight to each edge -(more on this later) to choose between several alternative edges.</p> -<p>The definition of the compilation graph (see file <tt class="docutils literal">llvmc/src/Base.td</tt> for an -example) is just a list of edges:</p> -<pre class="literal-block"> -def CompilationGraph : CompilationGraph<[ - Edge<"root", "llvm_gcc_c">, - Edge<"root", "llvm_gcc_assembler">, - ... - - Edge<"llvm_gcc_c", "llc">, - Edge<"llvm_gcc_cpp", "llc">, - ... - - OptionalEdge<"llvm_gcc_c", "opt", (case (switch_on "opt"), - (inc_weight))>, - OptionalEdge<"llvm_gcc_cpp", "opt", (case (switch_on "opt"), - (inc_weight))>, - ... - - OptionalEdge<"llvm_gcc_assembler", "llvm_gcc_cpp_linker", - (case (input_languages_contain "c++"), (inc_weight), - (or (parameter_equals "linker", "g++"), - (parameter_equals "linker", "c++")), (inc_weight))>, - ... - - ]>; -</pre> -<p>As you can see, the edges can be either default or optional, where optional -edges are differentiated by an additional <tt class="docutils literal">case</tt> expression used to calculate -the weight of this edge. Notice also that we refer to tools via their names (as -strings). This makes it possible to add edges to an existing compilation graph -without having to know about all tool definitions used in the graph.</p> -<p>The default edges are assigned a weight of 1, and optional edges get a weight of -0 + 2*N where N is the number of tests that evaluated to true in the <tt class="docutils literal">case</tt> -expression. It is also possible to provide an integer parameter to -<tt class="docutils literal">inc_weight</tt> and <tt class="docutils literal">dec_weight</tt> - in this case, the weight is increased (or -decreased) by the provided value instead of the default 2. Default weight of an -optional edge can be changed by using the <tt class="docutils literal">default</tt> clause of the <tt class="docutils literal">case</tt> -construct.</p> -<p>When passing an input file through the graph, LLVMC picks the edge with the -maximum weight. To avoid ambiguity, there should be only one default edge -between two nodes (with the exception of the root node, which gets a special -treatment - there you are allowed to specify one default edge <em>per language</em>).</p> -<p>When multiple compilation graphs are defined, they are merged together. Multiple -edges with the same end nodes are not allowed (i.e. the graph is not a -multigraph), and will lead to a compile-time error.</p> -<p>To get a visual representation of the compilation graph (useful for debugging), -run <tt class="docutils literal">llvmc <span class="pre">--view-graph</span></tt>. You will need <tt class="docutils literal">dot</tt> and <tt class="docutils literal">gsview</tt> installed for -this to work properly.</p> -</div> -<div class="section" id="describing-options"> -<h1><a class="toc-backref" href="#id12">Describing options</a></h1> -<p>Command-line options supported by the driver are defined by using an -<tt class="docutils literal">OptionList</tt>:</p> -<pre class="literal-block"> -def Options : OptionList<[ -(switch_option "E", (help "Help string")), -(alias_option "quiet", "q") -... -]>; -</pre> -<p>As you can see, the option list is just a list of DAGs, where each DAG is an -option description consisting of the option name and some properties. More than -one option list can be defined (they are all merged together in the end), which -can be handy if one wants to separate option groups syntactically.</p> -<ul> -<li><p class="first">Possible option types:</p> -<blockquote> -<ul class="simple"> -<li><tt class="docutils literal">switch_option</tt> - a simple boolean switch without arguments, for example -<tt class="docutils literal"><span class="pre">-O2</span></tt> or <tt class="docutils literal"><span class="pre">-time</span></tt>. At most one occurrence is allowed by default.</li> -<li><tt class="docutils literal">parameter_option</tt> - option that takes one argument, for example -<tt class="docutils literal"><span class="pre">-std=c99</span></tt>. It is also allowed to use spaces instead of the equality -sign: <tt class="docutils literal"><span class="pre">-std</span> c99</tt>. At most one occurrence is allowed.</li> -<li><tt class="docutils literal">parameter_list_option</tt> - same as the above, but more than one option -occurrence is allowed.</li> -<li><tt class="docutils literal">prefix_option</tt> - same as the parameter_option, but the option name and -argument do not have to be separated. Example: <tt class="docutils literal"><span class="pre">-ofile</span></tt>. This can be also -specified as <tt class="docutils literal"><span class="pre">-o</span> file</tt>; however, <tt class="docutils literal"><span class="pre">-o=file</span></tt> will be parsed incorrectly -(<tt class="docutils literal">=file</tt> will be interpreted as option value). At most one occurrence is -allowed.</li> -<li><tt class="docutils literal">prefix_list_option</tt> - same as the above, but more than one occurrence of -the option is allowed; example: <tt class="docutils literal"><span class="pre">-lm</span> <span class="pre">-lpthread</span></tt>.</li> -<li><tt class="docutils literal">alias_option</tt> - a special option type for creating aliases. Unlike other -option types, aliases are not allowed to have any properties besides the -aliased option name. -Usage example: <tt class="docutils literal">(alias_option "preprocess", "E")</tt></li> -<li><tt class="docutils literal">switch_list_option</tt> - like <tt class="docutils literal">switch_option</tt> with the <tt class="docutils literal">zero_or_more</tt> -property, but remembers how many times the switch was turned on. Useful -mostly for forwarding. Example: when <tt class="docutils literal"><span class="pre">-foo</span></tt> is a switch option (with the -<tt class="docutils literal">zero_or_more</tt> property), the command <tt class="docutils literal">driver <span class="pre">-foo</span> <span class="pre">-foo</span></tt> is forwarded -as <tt class="docutils literal"><span class="pre">some-tool</span> <span class="pre">-foo</span></tt>, but when <tt class="docutils literal"><span class="pre">-foo</span></tt> is a switch list, the same command -is forwarded as <tt class="docutils literal"><span class="pre">some-tool</span> <span class="pre">-foo</span> <span class="pre">-foo</span></tt>.</li> -</ul> -</blockquote> -</li> -<li><p class="first">Possible option properties:</p> -<blockquote> -<ul class="simple"> -<li><tt class="docutils literal">help</tt> - help string associated with this option. Used for <tt class="docutils literal"><span class="pre">--help</span></tt> -output.</li> -<li><tt class="docutils literal">required</tt> - this option must be specified exactly once (or, in case of -the list options without the <tt class="docutils literal">multi_val</tt> property, at least -once). Incompatible with <tt class="docutils literal">optional</tt> and <tt class="docutils literal">one_or_more</tt>.</li> -<li><tt class="docutils literal">optional</tt> - the option can be specified either zero times or exactly -once. The default for switch options. Useful only for list options in -conjunction with <tt class="docutils literal">multi_val</tt>. Incompatible with <tt class="docutils literal">required</tt>, -<tt class="docutils literal">zero_or_more</tt> and <tt class="docutils literal">one_or_more</tt>.</li> -<li><tt class="docutils literal">one_or_more</tt> - the option must be specified at least once. Can be useful -to allow switch options be both obligatory and be specified multiple -times. For list options is useful only in conjunction with <tt class="docutils literal">multi_val</tt>; -for ordinary it is synonymous with <tt class="docutils literal">required</tt>. Incompatible with -<tt class="docutils literal">required</tt>, <tt class="docutils literal">optional</tt> and <tt class="docutils literal">zero_or_more</tt>.</li> -<li><tt class="docutils literal">zero_or_more</tt> - the option can be specified zero or more times. Useful -to allow a single switch option to be specified more than -once. Incompatible with <tt class="docutils literal">required</tt>, <tt class="docutils literal">optional</tt> and <tt class="docutils literal">one_or_more</tt>.</li> -<li><tt class="docutils literal">hidden</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> -output).</li> -<li><tt class="docutils literal">really_hidden</tt> - the option will not be mentioned in any help -output.</li> -<li><tt class="docutils literal">comma_separated</tt> - Indicates that any commas specified for an option's -value should be used to split the value up into multiple values for the -option. This property is valid only for list options. In conjunction with -<tt class="docutils literal">forward_value</tt> can be used to implement option forwarding in style of -gcc's <tt class="docutils literal"><span class="pre">-Wa,</span></tt>.</li> -<li><tt class="docutils literal">multi_val n</tt> - this option takes <em>n</em> arguments (can be useful in some -special cases). Usage example: <tt class="docutils literal">(parameter_list_option "foo", (multi_val -3))</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">one_or_more</tt>, <tt class="docutils literal">optional</tt> -and <tt class="docutils literal">required</tt> properties.</li> -<li><tt class="docutils literal">init</tt> - this option has a default value, either a string (if it is a -parameter), or a boolean (if it is a switch; as in C++, boolean constants -are called <tt class="docutils literal">true</tt> and <tt class="docutils literal">false</tt>). List options can't have <tt class="docutils literal">init</tt> -attribute. -Usage examples: <tt class="docutils literal">(switch_option "foo", (init true))</tt>; <tt class="docutils literal">(prefix_option -"bar", (init <span class="pre">"baz"))</span></tt>.</li> -</ul> -</blockquote> -</li> -</ul> -</div> -<div class="section" id="conditional-evaluation"> -<span id="case"></span><h1><a class="toc-backref" href="#id13">Conditional evaluation</a></h1> -<p>The 'case' construct is the main means by which programmability is achieved in -LLVMC. It can be used to calculate edge weights, program actions and modify the -shell commands to be executed. The 'case' expression is designed after the -similarly-named construct in functional languages and takes the form <tt class="docutils literal">(case -(test_1), statement |