X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=utils%2FTableGen%2FTableGenBackend.cpp;h=87a1b3da11969720a5a4923a95d660cdb8066242;hb=20072af3b0b22d90afbce769409f4ed822520366;hp=67a37885db1a7d21df92f79cdd410709008b7124;hpb=d0fde30ce850b78371fd1386338350591f9ff494;p=oota-llvm.git diff --git a/utils/TableGen/TableGenBackend.cpp b/utils/TableGen/TableGenBackend.cpp index 67a37885db1..87a1b3da119 100644 --- a/utils/TableGen/TableGenBackend.cpp +++ b/utils/TableGen/TableGenBackend.cpp @@ -1,10 +1,10 @@ //===- TableGenBackend.cpp - Base class for TableGen Backends ---*- C++ -*-===// -// +// // The LLVM Compiler Infrastructure // -// This file was developed by the LLVM research group and is distributed under -// the University of Illinois Open Source License. See LICENSE.TXT for details. -// +// 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... @@ -13,29 +13,13 @@ #include "TableGenBackend.h" #include "Record.h" -#include - -namespace llvm { +using namespace llvm; void TableGenBackend::EmitSourceFileHeader(const std::string &Desc, std::ostream &OS) const { OS << "//===- TableGen'erated file -------------------------------------*-" " C++ -*-===//\n//\n// " << Desc << "\n//\n// Automatically generate" "d file, do not edit!\n//\n//===------------------------------------" - "----------------------------------===//\n\nnamespace llvm {\n\n"; -} - -void TableGenBackend::EmitSourceFileTail( std::ostream& OS ) const { - OS << "} // End llvm namespace \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(); + "----------------------------------===//\n\n"; } -} // End llvm namespace