X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=utils%2FTableGen%2FTableGenBackend.cpp;h=87a1b3da11969720a5a4923a95d660cdb8066242;hb=f915253dfcfbe772ee04872544a4f012c6f851be;hp=c0a67e339243c86483539e24cac8e6053a967d7e;hpb=18a6a94e1fc5cd10d50a91598b1465f31e307266;p=oota-llvm.git diff --git a/utils/TableGen/TableGenBackend.cpp b/utils/TableGen/TableGenBackend.cpp index c0a67e33924..87a1b3da119 100644 --- a/utils/TableGen/TableGenBackend.cpp +++ b/utils/TableGen/TableGenBackend.cpp @@ -1,12 +1,19 @@ //===- TableGenBackend.cpp - Base class for TableGen Backends ---*- C++ -*-===// // +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// // This file provides useful services for TableGen backends... // //===----------------------------------------------------------------------===// #include "TableGenBackend.h" #include "Record.h" -#include +using namespace llvm; void TableGenBackend::EmitSourceFileHeader(const std::string &Desc, std::ostream &OS) const { @@ -16,21 +23,3 @@ void TableGenBackend::EmitSourceFileHeader(const std::string &Desc, "----------------------------------===//\n\n"; } -/// getQualifiedName - Return the name of the specified record, with a -/// namespace qualifier if the record contains one. -/// -std::string TableGenBackend::getQualifiedName(Record *R) const { - std::string Namespace = R->getValueAsString("Namespace"); - if (Namespace.empty()) return R->getName(); - return Namespace + "::" + R->getName(); -} - -/// getTarget - Return the current instance of the Target class. -/// -Record *TableGenBackend::getTarget(RecordKeeper &RC) const { - std::vector Targets = RC.getAllDerivedDefinitions("Target"); - - if (Targets.size() != 1) - throw std::string("ERROR: Multiple subclasses of Target defined!"); - return Targets[0]; -}