aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean Silva <silvas@purdue.edu>2012-10-03 21:31:08 +0000
committerSean Silva <silvas@purdue.edu>2012-10-03 21:31:08 +0000
commit3c0962878cbc3bd5e3c482d458a242636fbbe140 (patch)
treeba03d8f1b356bda1a94bd24caa5f79aeb865c9ed
parent9e21138ab7387fbd58509faf6e90f581914716df (diff)
tblgen: Remove last traces of old TableGenMain API.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165168 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/llvm/TableGen/Main.h5
-rw-r--r--include/llvm/TableGen/TableGenAction.h35
-rw-r--r--lib/TableGen/CMakeLists.txt1
-rw-r--r--lib/TableGen/Main.cpp21
-rw-r--r--lib/TableGen/TableGenAction.cpp15
5 files changed, 1 insertions, 76 deletions
diff --git a/include/llvm/TableGen/Main.h b/include/llvm/TableGen/Main.h
index 663779f176..7ef249e5bd 100644
--- a/include/llvm/TableGen/Main.h
+++ b/include/llvm/TableGen/Main.h
@@ -16,11 +16,6 @@
namespace llvm {
-class TableGenAction;
-
-/// Run the table generator, performing the specified Action on parsed records.
-int TableGenMain(char *argv0, TableGenAction &Action);
-
class RecordKeeper;
class raw_ostream;
typedef bool TableGenMainFn(raw_ostream &OS, RecordKeeper &Records);
diff --git a/include/llvm/TableGen/TableGenAction.h b/include/llvm/TableGen/TableGenAction.h
deleted file mode 100644
index 733ae62644..0000000000
--- a/include/llvm/TableGen/TableGenAction.h
+++ /dev/null
@@ -1,35 +0,0 @@
-//===- llvm/TableGen/TableGenAction.h - defines TableGenAction --*- C++ -*-===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-//
-// This file defines the TableGenAction base class to be derived from by
-// tblgen tools.
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef LLVM_TABLEGEN_TABLEGENACTION_H
-#define LLVM_TABLEGEN_TABLEGENACTION_H
-
-namespace llvm {
-
-class raw_ostream;
-class RecordKeeper;
-
-class TableGenAction {
- virtual void anchor();
-public:
- virtual ~TableGenAction() {}
-
- /// Perform the action using Records, and write output to OS.
- /// @returns true on error, false otherwise
- virtual bool operator()(raw_ostream &OS, RecordKeeper &Records) = 0;
-};
-
-}
-
-#endif
diff --git a/lib/TableGen/CMakeLists.txt b/lib/TableGen/CMakeLists.txt
index ba7bf14e5d..28240f4a67 100644
--- a/lib/TableGen/CMakeLists.txt
+++ b/lib/TableGen/CMakeLists.txt
@@ -7,7 +7,6 @@ add_llvm_library(LLVMTableGen
Main.cpp
Record.cpp
StringMatcher.cpp
- TableGenAction.cpp
TableGenBackend.cpp
TGLexer.cpp
TGParser.cpp
diff --git a/lib/TableGen/Main.cpp b/lib/TableGen/Main.cpp
index 83bc66f460..2c37aa76a1 100644
--- a/lib/TableGen/Main.cpp
+++ b/lib/TableGen/Main.cpp
@@ -24,7 +24,6 @@
#include "llvm/TableGen/Error.h"
#include "llvm/TableGen/Main.h"
#include "llvm/TableGen/Record.h"
-#include "llvm/TableGen/TableGenAction.h"
#include <algorithm>
#include <cstdio>
using namespace llvm;
@@ -48,27 +47,9 @@ namespace {
cl::value_desc("directory"), cl::Prefix);
}
-namespace {
-// XXX: this is a crutch for transitioning to the new TableGenMain API
-// (with a TableGenMainFn* instead of a pointless class).
-class StubTransitionalTableGenAction : public TableGenAction {
- TableGenMainFn *MainFn;
-public:
- StubTransitionalTableGenAction(TableGenMainFn *M) : MainFn(M) {}
- bool operator()(raw_ostream &OS, RecordKeeper &Records) {
- return MainFn(OS, Records);
- }
-};
-}
-
namespace llvm {
int TableGenMain(char *argv0, TableGenMainFn *MainFn) {
- StubTransitionalTableGenAction Action(MainFn);
- return TableGenMain(argv0, Action);
-}
-
-int TableGenMain(char *argv0, TableGenAction &Action) {
RecordKeeper Records;
try {
@@ -123,7 +104,7 @@ int TableGenMain(char *argv0, TableGenAction &Action) {
DepOut.keep();
}
- if (Action(Out.os(), Records))
+ if (MainFn(Out.os(), Records))
return 1;
// Declare success.
diff --git a/lib/TableGen/TableGenAction.cpp b/lib/TableGen/TableGenAction.cpp
deleted file mode 100644
index 54e5083094..0000000000
--- a/lib/TableGen/TableGenAction.cpp
+++ /dev/null
@@ -1,15 +0,0 @@
-//===- TableGenAction.cpp - defines TableGenAction --------------*- C++ -*-===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-#include "llvm/TableGen/TableGenAction.h"
-
-using namespace llvm;
-
-void TableGenAction::anchor() { }
-