2009-03-03 10:04:57 +00:00
|
|
|
//===- Simple.td - A simple plugin for LLVMC ------------------------------===//
|
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
2008-10-16 14:02:29 +00:00
|
|
|
//
|
2009-03-03 10:04:57 +00:00
|
|
|
//===----------------------------------------------------------------------===//
|
2008-10-16 14:02:29 +00:00
|
|
|
//
|
2009-03-03 10:04:57 +00:00
|
|
|
// A simple LLVMC-based gcc wrapper that shows how to write LLVMC plugins.
|
2008-10-16 14:02:29 +00:00
|
|
|
//
|
2009-03-03 10:04:57 +00:00
|
|
|
// To compile, use this command:
|
|
|
|
//
|
|
|
|
// $ cd $LLVMC_DIR/example/Simple
|
2008-10-16 14:02:29 +00:00
|
|
|
// $ make
|
|
|
|
//
|
|
|
|
// Run as:
|
|
|
|
//
|
2009-03-03 10:04:57 +00:00
|
|
|
// $ llvmc -load $LLVM_DIR/Release/lib/plugin_llvmc_Simple.so
|
|
|
|
//
|
|
|
|
// For instructions on how to build your own LLVMC-based driver, see
|
|
|
|
// the 'example/Skeleton' directory.
|
|
|
|
//===----------------------------------------------------------------------===//
|
2008-10-16 14:02:29 +00:00
|
|
|
|
|
|
|
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"]>]>;
|
|
|
|
|
2008-11-17 17:29:18 +00:00
|
|
|
def CompilationGraph : CompilationGraph<[Edge<"root", "gcc">]>;
|