summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvmc/plugins/Simple
diff options
context:
space:
mode:
authorMikhail Glushenkov <foldr@codedgers.com>2008-11-25 21:38:12 +0000
committerMikhail Glushenkov <foldr@codedgers.com>2008-11-25 21:38:12 +0000
commit98d5ed5cb72e4db9cdacbfa5cdb31626729b7738 (patch)
tree45fc6355ae8f9f2f478aa489554d96b34a5fbaef /llvm/tools/llvmc/plugins/Simple
parent67630080b9022d0a4ef2da0f13986c876efc51ed (diff)
downloadbcm5719-llvm-98d5ed5cb72e4db9cdacbfa5cdb31626729b7738.tar.gz
bcm5719-llvm-98d5ed5cb72e4db9cdacbfa5cdb31626729b7738.zip
Since the old llvmc was removed, rename llvmc2 to llvmc.
llvm-svn: 60048
Diffstat (limited to 'llvm/tools/llvmc/plugins/Simple')
-rw-r--r--llvm/tools/llvmc/plugins/Simple/Makefile13
-rw-r--r--llvm/tools/llvmc/plugins/Simple/PluginMain.cpp1
-rw-r--r--llvm/tools/llvmc/plugins/Simple/Simple.td30
3 files changed, 44 insertions, 0 deletions
diff --git a/llvm/tools/llvmc/plugins/Simple/Makefile b/llvm/tools/llvmc/plugins/Simple/Makefile
new file mode 100644
index 00000000000..1cd5af7a15e
--- /dev/null
+++ b/llvm/tools/llvmc/plugins/Simple/Makefile
@@ -0,0 +1,13 @@
+##===- tools/llvmc/plugins/Simple/Makefile -----------------*- Makefile -*-===##
+#
+# The LLVM Compiler Infrastructure
+#
+# This file is distributed under the University of Illinois Open Source
+# License. See LICENSE.TXT for details.
+#
+##===----------------------------------------------------------------------===##
+
+LLVMC_PLUGIN = Simple
+BUILT_SOURCES = AutoGenerated.inc
+
+include ../Makefile
diff --git a/llvm/tools/llvmc/plugins/Simple/PluginMain.cpp b/llvm/tools/llvmc/plugins/Simple/PluginMain.cpp
new file mode 100644
index 00000000000..add8acb4a57
--- /dev/null
+++ b/llvm/tools/llvmc/plugins/Simple/PluginMain.cpp
@@ -0,0 +1 @@
+#include "AutoGenerated.inc"
diff --git a/llvm/tools/llvmc/plugins/Simple/Simple.td b/llvm/tools/llvmc/plugins/Simple/Simple.td
new file mode 100644
index 00000000000..b974cbc95eb
--- /dev/null
+++ b/llvm/tools/llvmc/plugins/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