[llvm-commits] [llvm] r65939 - in /llvm/trunk/tools/llvmc: example/ example/Hello/ example/Hello/Hello.cpp example/Hello/Makefile example/Simple/ example/Simple/Makefile example/Simple/PluginMain.cpp example/Simple/Simple.td plugins/Hello/Hello.cpp plugins/Hello/Makefile plugins/Simple/Makefile plugins/Simple/PluginMain.cpp plugins/Simple/Simple.td

Mikhail Glushenkov foldr at codedgers.com
Tue Mar 3 02:03:00 PST 2009


Author: foldr
Date: Tue Mar  3 04:02:53 2009
New Revision: 65939

URL: http://llvm.org/viewvc/llvm-project?rev=65939&view=rev
Log:
Move example plugins to the example/ directory.

Added:
    llvm/trunk/tools/llvmc/example/
    llvm/trunk/tools/llvmc/example/Hello/
    llvm/trunk/tools/llvmc/example/Hello/Hello.cpp
      - copied, changed from r65938, llvm/trunk/tools/llvmc/plugins/Hello/Hello.cpp
    llvm/trunk/tools/llvmc/example/Hello/Makefile
      - copied, changed from r65938, llvm/trunk/tools/llvmc/plugins/Hello/Makefile
    llvm/trunk/tools/llvmc/example/Simple/
    llvm/trunk/tools/llvmc/example/Simple/Makefile
      - copied, changed from r65938, llvm/trunk/tools/llvmc/plugins/Simple/Makefile
    llvm/trunk/tools/llvmc/example/Simple/PluginMain.cpp
      - copied, changed from r65938, llvm/trunk/tools/llvmc/plugins/Simple/PluginMain.cpp
    llvm/trunk/tools/llvmc/example/Simple/Simple.td
      - copied, changed from r65938, llvm/trunk/tools/llvmc/plugins/Simple/Simple.td
Removed:
    llvm/trunk/tools/llvmc/plugins/Hello/Hello.cpp
    llvm/trunk/tools/llvmc/plugins/Hello/Makefile
    llvm/trunk/tools/llvmc/plugins/Simple/Makefile
    llvm/trunk/tools/llvmc/plugins/Simple/PluginMain.cpp
    llvm/trunk/tools/llvmc/plugins/Simple/Simple.td

Copied: llvm/trunk/tools/llvmc/example/Hello/Hello.cpp (from r65938, llvm/trunk/tools/llvmc/plugins/Hello/Hello.cpp)
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvmc/example/Hello/Hello.cpp?p2=llvm/trunk/tools/llvmc/example/Hello/Hello.cpp&p1=llvm/trunk/tools/llvmc/plugins/Hello/Hello.cpp&r1=65938&r2=65939&rev=65939&view=diff

==============================================================================
    (empty)

Copied: llvm/trunk/tools/llvmc/example/Hello/Makefile (from r65938, llvm/trunk/tools/llvmc/plugins/Hello/Makefile)
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvmc/example/Hello/Makefile?p2=llvm/trunk/tools/llvmc/example/Hello/Makefile&p1=llvm/trunk/tools/llvmc/plugins/Hello/Makefile&r1=65938&r2=65939&rev=65939&view=diff

==============================================================================
    (empty)

Copied: llvm/trunk/tools/llvmc/example/Simple/Makefile (from r65938, llvm/trunk/tools/llvmc/plugins/Simple/Makefile)
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvmc/example/Simple/Makefile?p2=llvm/trunk/tools/llvmc/example/Simple/Makefile&p1=llvm/trunk/tools/llvmc/plugins/Simple/Makefile&r1=65938&r2=65939&rev=65939&view=diff

==============================================================================
    (empty)

Copied: llvm/trunk/tools/llvmc/example/Simple/PluginMain.cpp (from r65938, llvm/trunk/tools/llvmc/plugins/Simple/PluginMain.cpp)
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvmc/example/Simple/PluginMain.cpp?p2=llvm/trunk/tools/llvmc/example/Simple/PluginMain.cpp&p1=llvm/trunk/tools/llvmc/plugins/Simple/PluginMain.cpp&r1=65938&r2=65939&rev=65939&view=diff

==============================================================================
    (empty)

Copied: llvm/trunk/tools/llvmc/example/Simple/Simple.td (from r65938, llvm/trunk/tools/llvmc/plugins/Simple/Simple.td)
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvmc/example/Simple/Simple.td?p2=llvm/trunk/tools/llvmc/example/Simple/Simple.td&p1=llvm/trunk/tools/llvmc/plugins/Simple/Simple.td&r1=65938&r2=65939&rev=65939&view=diff

==============================================================================
    (empty)

Removed: llvm/trunk/tools/llvmc/plugins/Hello/Hello.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvmc/plugins/Hello/Hello.cpp?rev=65938&view=auto

==============================================================================
--- llvm/trunk/tools/llvmc/plugins/Hello/Hello.cpp (original)
+++ llvm/trunk/tools/llvmc/plugins/Hello/Hello.cpp (removed)
@@ -1,30 +0,0 @@
-//===- Hello.cpp - Example code from "Writing an LLVM Pass" ---------------===//
-//
-//                     The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-//
-// Test plugin for LLVMC. Shows how to write plugins without using TableGen.
-//
-//===----------------------------------------------------------------------===//
-
-#include "llvm/CompilerDriver/CompilationGraph.h"
-#include "llvm/CompilerDriver/Plugin.h"
-
-#include <iostream>
-
-namespace {
-struct MyPlugin : public llvmc::BasePlugin {
-  void PopulateLanguageMap(llvmc::LanguageMap&) const
-  { std::cout << "Hello!\n"; }
-
-  void PopulateCompilationGraph(llvmc::CompilationGraph&) const
-  {}
-};
-
-static llvmc::RegisterPlugin<MyPlugin> RP("Hello", "Hello World plugin");
-
-}

Removed: llvm/trunk/tools/llvmc/plugins/Hello/Makefile
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvmc/plugins/Hello/Makefile?rev=65938&view=auto

==============================================================================
--- llvm/trunk/tools/llvmc/plugins/Hello/Makefile (original)
+++ llvm/trunk/tools/llvmc/plugins/Hello/Makefile (removed)
@@ -1,14 +0,0 @@
-##===- tools/llvmc/plugins/Hello/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_PLUGIN = Hello
-
-include $(LEVEL)/Makefile.common

Removed: llvm/trunk/tools/llvmc/plugins/Simple/Makefile
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvmc/plugins/Simple/Makefile?rev=65938&view=auto

==============================================================================
--- llvm/trunk/tools/llvmc/plugins/Simple/Makefile (original)
+++ llvm/trunk/tools/llvmc/plugins/Simple/Makefile (removed)
@@ -1,15 +0,0 @@
-##===- 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.
-#
-##===----------------------------------------------------------------------===##
-
-LEVEL = ../../../..
-
-LLVMC_PLUGIN = Simple
-BUILT_SOURCES = AutoGenerated.inc
-
-include $(LEVEL)/Makefile.common

Removed: llvm/trunk/tools/llvmc/plugins/Simple/PluginMain.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvmc/plugins/Simple/PluginMain.cpp?rev=65938&view=auto

==============================================================================
--- llvm/trunk/tools/llvmc/plugins/Simple/PluginMain.cpp (original)
+++ llvm/trunk/tools/llvmc/plugins/Simple/PluginMain.cpp (removed)
@@ -1 +0,0 @@
-#include "AutoGenerated.inc"

Removed: llvm/trunk/tools/llvmc/plugins/Simple/Simple.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvmc/plugins/Simple/Simple.td?rev=65938&view=auto

==============================================================================
--- llvm/trunk/tools/llvmc/plugins/Simple/Simple.td (original)
+++ llvm/trunk/tools/llvmc/plugins/Simple/Simple.td (removed)
@@ -1,30 +0,0 @@
-// 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">]>;





More information about the llvm-commits mailing list