diff options
author | dim <dim@FreeBSD.org> | 2010-09-17 15:48:55 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2010-09-17 15:48:55 +0000 |
commit | 5d5cc59cc77afe655b3707cb0e69e0827b444cad (patch) | |
tree | 36453626c792cccd91f783a38a169d610a6b9db9 /tools/llvmc/examples/Skeleton | |
parent | 786a18553586229ad99ecb5ecde8a9d914c45e27 (diff) | |
download | FreeBSD-src-5d5cc59cc77afe655b3707cb0e69e0827b444cad.zip FreeBSD-src-5d5cc59cc77afe655b3707cb0e69e0827b444cad.tar.gz |
Vendor import of llvm r114020 (from the release_28 branch):
http://llvm.org/svn/llvm-project/llvm/branches/release_28@114020
Approved by: rpaulo (mentor)
Diffstat (limited to 'tools/llvmc/examples/Skeleton')
-rw-r--r-- | tools/llvmc/examples/Skeleton/AutoGenerated.td | 7 | ||||
-rw-r--r-- | tools/llvmc/examples/Skeleton/Hooks.cpp | 12 | ||||
-rw-r--r-- | tools/llvmc/examples/Skeleton/Main.cpp | 15 | ||||
-rw-r--r-- | tools/llvmc/examples/Skeleton/Makefile | 20 | ||||
-rw-r--r-- | tools/llvmc/examples/Skeleton/README | 6 |
5 files changed, 60 insertions, 0 deletions
diff --git a/tools/llvmc/examples/Skeleton/AutoGenerated.td b/tools/llvmc/examples/Skeleton/AutoGenerated.td new file mode 100644 index 0000000..97483ce --- /dev/null +++ b/tools/llvmc/examples/Skeleton/AutoGenerated.td @@ -0,0 +1,7 @@ +//===- AutoGenerated.td ------------------------------------*- tablegen -*-===// +// +// Write the TableGen description of your llvmc-based driver here. +// +//===----------------------------------------------------------------------===// + +include "llvm/CompilerDriver/Common.td" diff --git a/tools/llvmc/examples/Skeleton/Hooks.cpp b/tools/llvmc/examples/Skeleton/Hooks.cpp new file mode 100644 index 0000000..ddd38f6 --- /dev/null +++ b/tools/llvmc/examples/Skeleton/Hooks.cpp @@ -0,0 +1,12 @@ +//===--- Hooks.cpp - The LLVM Compiler Driver -------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open +// Source License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// Hook definitions should go here. +// +//===----------------------------------------------------------------------===// diff --git a/tools/llvmc/examples/Skeleton/Main.cpp b/tools/llvmc/examples/Skeleton/Main.cpp new file mode 100644 index 0000000..24c7768 --- /dev/null +++ b/tools/llvmc/examples/Skeleton/Main.cpp @@ -0,0 +1,15 @@ +//===--- Main.cpp - The LLVM Compiler Driver -------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open +// Source License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// Just include CompilerDriver/Main.inc and AutoGenerated.inc. +// +//===----------------------------------------------------------------------===// + +#include "llvm/CompilerDriver/Main.inc" +#include "AutoGenerated.inc" diff --git a/tools/llvmc/examples/Skeleton/Makefile b/tools/llvmc/examples/Skeleton/Makefile new file mode 100644 index 0000000..41ca823 --- /dev/null +++ b/tools/llvmc/examples/Skeleton/Makefile @@ -0,0 +1,20 @@ +##===- llvmc/examples/Skeleton/Makefile --------------------*- Makefile -*-===## +# +# The LLVM Compiler Infrastructure +# +# This file is distributed under the University of Illinois Open +# Source License. See LICENSE.TXT for details. +# +##===----------------------------------------------------------------------===## + +# Change this so that $(LEVEL)/Makefile.common refers to +# $LLVM_OBJ_DIR/Makefile.common or $YOUR_LLVM_BASED_PROJECT/Makefile.common. +export LEVEL = ../../../.. + +# Change this to the name of your LLVMC-based driver. +LLVMC_BASED_DRIVER = llvmc-skeleton + +# Change this to the name of .inc file built from your .td file. +BUILT_SOURCES = AutoGenerated.inc + +include $(LEVEL)/Makefile.common diff --git a/tools/llvmc/examples/Skeleton/README b/tools/llvmc/examples/Skeleton/README new file mode 100644 index 0000000..61ff6fb --- /dev/null +++ b/tools/llvmc/examples/Skeleton/README @@ -0,0 +1,6 @@ + +This is a template that can be used to create your own LLVMC-based drivers. Just +copy the `Skeleton` directory to the location of your preference and edit +`Skeleton/Makefile` and `Skeleton/AutoGenerated.inc`. + +The build system assumes that your project is based on LLVM. |