diff options
author | Mikhail Glushenkov <foldr@codedgers.com> | 2009-03-03 11:02:48 +0000 |
---|---|---|
committer | Mikhail Glushenkov <foldr@codedgers.com> | 2009-03-03 11:02:48 +0000 |
commit | 33435e49a99efe439081e34c29276745cf35e827 (patch) | |
tree | bd67d07bc0b2e2f2faabaa368db3c5df1103c06a /llvm/tools/llvmc/example/Skeleton/plugins | |
parent | b5f56fc2689831f3e0a6442d46bfaf59005247e0 (diff) | |
download | bcm5719-llvm-33435e49a99efe439081e34c29276745cf35e827.tar.gz bcm5719-llvm-33435e49a99efe439081e34c29276745cf35e827.zip |
Add example/Skeleton.
This is a template that can be used to build your own LLVMC-based drivers.
It can be also useful as a "bare-bones" LLVMC.
llvm-svn: 65944
Diffstat (limited to 'llvm/tools/llvmc/example/Skeleton/plugins')
4 files changed, 43 insertions, 0 deletions
diff --git a/llvm/tools/llvmc/example/Skeleton/plugins/Makefile b/llvm/tools/llvmc/example/Skeleton/plugins/Makefile new file mode 100644 index 00000000000..fb07f23d58e --- /dev/null +++ b/llvm/tools/llvmc/example/Skeleton/plugins/Makefile @@ -0,0 +1,18 @@ +##===- llvmc/example/Skeleton/plugins/Makefile -------------*- Makefile -*-===## +# +# The LLVM Compiler Infrastructure +# +# This file is distributed under the University of Illinois Open +# Source License. See LICENSE.TXT for details. +# +##===----------------------------------------------------------------------===## + +LEVEL = $(LLVMC_BASE_LEVEL)/.. + +ifneq ($(LLVMC_BUILTIN_PLUGINS),) +DIRS = $(LLVMC_BUILTIN_PLUGINS) +endif + +export LLVMC_BUILTIN_PLUGIN=1 + +include $(LEVEL)/Makefile.common diff --git a/llvm/tools/llvmc/example/Skeleton/plugins/Plugin/Makefile b/llvm/tools/llvmc/example/Skeleton/plugins/Plugin/Makefile new file mode 100644 index 00000000000..54f722165dc --- /dev/null +++ b/llvm/tools/llvmc/example/Skeleton/plugins/Plugin/Makefile @@ -0,0 +1,17 @@ +##===- llvmc/example/Skeleton/plugins/Plugin/Makefile ------*- Makefile -*-===## +# +# The LLVM Compiler Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See LICENSE.TXT for details. +# +##===----------------------------------------------------------------------===## + +LEVEL = $(LLVMC_BASE_LEVEL)/../.. + +# Change this to the name of your plugin. +LLVMC_PLUGIN = Plugin + +BUILT_SOURCES = AutoGenerated.inc + +include $(LEVEL)/Makefile.common diff --git a/llvm/tools/llvmc/example/Skeleton/plugins/Plugin/Plugin.td b/llvm/tools/llvmc/example/Skeleton/plugins/Plugin/Plugin.td new file mode 100644 index 00000000000..febb9ad374e --- /dev/null +++ b/llvm/tools/llvmc/example/Skeleton/plugins/Plugin/Plugin.td @@ -0,0 +1,7 @@ +//===- Plugin.td - A skeleton plugin for LLVMC -------------*- tablegen -*-===// +// +// Write the code for your plugin here. +// +//===----------------------------------------------------------------------===// + +include "llvm/CompilerDriver/Common.td" diff --git a/llvm/tools/llvmc/example/Skeleton/plugins/Plugin/PluginMain.cpp b/llvm/tools/llvmc/example/Skeleton/plugins/Plugin/PluginMain.cpp new file mode 100644 index 00000000000..add8acb4a57 --- /dev/null +++ b/llvm/tools/llvmc/example/Skeleton/plugins/Plugin/PluginMain.cpp @@ -0,0 +1 @@ +#include "AutoGenerated.inc" |