Move TableGen's parser and entry point into a library
[oota-llvm.git] / lib / TableGen / TableGenBackend.cpp
1 //===- TableGenBackend.cpp - Base class for TableGen Backends ---*- C++ -*-===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This file provides useful services for TableGen backends...
11 //
12 //===----------------------------------------------------------------------===//
13
14 #include "llvm/TableGen/TableGenBackend.h"
15 #include "llvm/TableGen/Record.h"
16 using namespace llvm;
17
18 void TableGenBackend::EmitSourceFileHeader(const std::string &Desc,
19                                            raw_ostream &OS) const {
20   OS << "//===- TableGen'erated file -------------------------------------*-"
21        " C++ -*-===//\n//\n// " << Desc << "\n//\n// Automatically generate"
22        "d file, do not edit!\n//\n//===------------------------------------"
23        "----------------------------------===//\n\n";
24 }
25