mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-05 13:26:55 +00:00
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
This commit is contained in:
@@ -7,7 +7,6 @@ add_llvm_library(LLVMTableGen
|
||||
Main.cpp
|
||||
Record.cpp
|
||||
StringMatcher.cpp
|
||||
TableGenAction.cpp
|
||||
TableGenBackend.cpp
|
||||
TGLexer.cpp
|
||||
TGParser.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.
|
||||
|
@@ -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() { }
|
||||
|
Reference in New Issue
Block a user