summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvmc/example/Simple/Simple.td
diff options
context:
space:
mode:
authorMikhail Glushenkov <foldr@codedgers.com>2009-03-03 10:02:53 +0000
committerMikhail Glushenkov <foldr@codedgers.com>2009-03-03 10:02:53 +0000
commitb00b964697515e10a4f19c87f4bb6fdb0b41419b (patch)
treeabdaab2b53a4afe1b487cdfac95a482cc59fa1c8 /llvm/tools/llvmc/example/Simple/Simple.td
parent9e26e6d3cb8ca24058f2c0f6ba9cb7191857c8a1 (diff)
downloadbcm5719-llvm-b00b964697515e10a4f19c87f4bb6fdb0b41419b.tar.gz
bcm5719-llvm-b00b964697515e10a4f19c87f4bb6fdb0b41419b.zip
Move example plugins to the example/ directory.
llvm-svn: 65939
Diffstat (limited to 'llvm/tools/llvmc/example/Simple/Simple.td')
-rw-r--r--llvm/tools/llvmc/example/Simple/Simple.td30
1 files changed, 30 insertions, 0 deletions
diff --git a/llvm/tools/llvmc/example/Simple/Simple.td b/llvm/tools/llvmc/example/Simple/Simple.td
new file mode 100644
index 00000000000..b974cbc95eb
--- /dev/null
+++ b/llvm/tools/llvmc/example/Simple/Simple.td
@@ -0,0 +1,30 @@
+// A simple wrapper for gcc.
+// To compile, use this command:
+//
+// $ cd $LLVMC2_DIR
+// $ make DRIVER_NAME=mygcc BUILTIN_PLUGINS=Simple
+//
+// To build this plugin as a dynamic library:
+//
+// $ cd $LLVMC2_DIR
+// $ make BUILTIN_PLUGINS=""
+// $ cd plugins/Simple
+// $ make
+//
+// Run as:
+//
+// $ llvmc2 -load $LLVM_DIR/Release/lib/LLVMCSimple.so
+
+include "llvm/CompilerDriver/Common.td"
+
+def gcc : Tool<
+[(in_language "c"),
+ (out_language "executable"),
+ (output_suffix "out"),
+ (cmd_line "gcc $INFILE -o $OUTFILE"),
+ (sink)
+]>;
+
+def LanguageMap : LanguageMap<[LangToSuffixes<"c", ["c"]>]>;
+
+def CompilationGraph : CompilationGraph<[Edge<"root", "gcc">]>;
OpenPOWER on IntegriCloud