llvm.org GIT mirror llvm / 536637f
docs: Add author info + fix incorrect code example. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60046 91177308-0d34-0410-b5e6-96231b3b80d8 Mikhail Glushenkov 11 years ago
2 changed file(s) with 9 addition(s) and 5 deletion(s). Raw diff Collapse all Expand all
0 ===================================
11 Customizing LLVMC: Reference Manual
22 ===================================
3 :Author: Mikhail Glushenkov
34
45 LLVMC is a generic compiler driver, designed to be customizable and
56 extensible. It plays the same role for LLVM as the ``gcc`` program
192193 Edge<"llvm_gcc_cpp", "llc">,
193194 ...
194195
195 OptionalEdge<"llvm_gcc_c", "opt", [(switch_on "opt")]>,
196 OptionalEdge<"llvm_gcc_cpp", "opt", [(switch_on "opt")]>,
196 OptionalEdge<"llvm_gcc_c", "opt", (case (switch_on "opt"),
197 (inc_weight))>,
198 OptionalEdge<"llvm_gcc_cpp", "opt", (case (switch_on "opt"),
199 (inc_weight))>,
197200 ...
198201
199202 OptionalEdge<"llvm_gcc_assembler", "llvm_gcc_cpp_linker",
436439
437440 * Possible tests are:
438441
439 - ``switch_on`` - Returns true if a given command-line option is
442 - ``switch_on`` - Returns true if a given command-line switch is
440443 provided by the user. Example: ``(switch_on "opt")``. Note that
441444 you have to define all possible command-line options separately in
442445 the tool descriptions. See the next section for the discussion of
480483 One last thing that you will need to modify when adding support for a
481484 new language to LLVMC is the language map, which defines mappings from
482485 file extensions to language names. It is used to choose the proper
483 toolchain(s) for a given input file set. Language map definition is
484 located in the file ``Tools.td`` and looks like this::
486 toolchain(s) for a given input file set. Language map definition looks
487 like this::
485488
486489 def LanguageMap : LanguageMap<
487490 [LangToSuffixes<"c++", ["cc", "cp", "cxx", "cpp", "CPP", "c++", "C"]>,
0 ======================
11 Tutorial - Using LLVMC
22 ======================
3 :Author: Mikhail Glushenkov
34
45 LLVMC is a generic compiler driver, which plays the same role for LLVM
56 as the ``gcc`` program does for GCC - the difference being that LLVMC