blob: 87bc385b7a70c975ef5c7ff8efbb0f72b19e804c [file] [log] [blame]
Mikhail Glushenkov8aac6002009-03-03 10:04:57 +00001//===- Simple.td - A simple plugin for LLVMC ------------------------------===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9//
10// A simple LLVMC-based gcc wrapper that shows how to write LLVMC plugins.
11//
Mikhail Glushenkov30207702008-10-16 14:02:29 +000012// To compile, use this command:
13//
Mikhail Glushenkov8aac6002009-03-03 10:04:57 +000014// $ cd $LLVMC_DIR/example/Simple
Mikhail Glushenkov30207702008-10-16 14:02:29 +000015// $ make
16//
17// Run as:
18//
Mikhail Glushenkov8aac6002009-03-03 10:04:57 +000019// $ llvmc -load $LLVM_DIR/Release/lib/plugin_llvmc_Simple.so
20//
21// For instructions on how to build your own LLVMC-based driver, see
22// the 'example/Skeleton' directory.
23//===----------------------------------------------------------------------===//
Mikhail Glushenkov30207702008-10-16 14:02:29 +000024
25include "llvm/CompilerDriver/Common.td"
26
27def gcc : Tool<
28[(in_language "c"),
29 (out_language "executable"),
30 (output_suffix "out"),
31 (cmd_line "gcc $INFILE -o $OUTFILE"),
32 (sink)
33]>;
34
35def LanguageMap : LanguageMap<[LangToSuffixes<"c", ["c"]>]>;
36
Mikhail Glushenkovfa990682008-11-17 17:29:18 +000037def CompilationGraph : CompilationGraph<[Edge<"root", "gcc">]>;