blob: b3e33b5f9c24d2186aab2928e0f47fa14cac380a [file] [log] [blame]
Chris Lattnerf5bd1b72003-10-05 19:27:59 +00001//===- TableGenBackend.cpp - Base class for TableGen Backends ---*- C++ -*-===//
Misha Brukman650ba8e2005-04-22 00:00:37 +00002//
John Criswelld3032032003-10-20 20:20:30 +00003// The LLVM Compiler Infrastructure
4//
Chris Lattner8adcd9f2007-12-29 20:37:13 +00005// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
Misha Brukman650ba8e2005-04-22 00:00:37 +00007//
John Criswelld3032032003-10-20 20:20:30 +00008//===----------------------------------------------------------------------===//
Chris Lattnerf5bd1b72003-10-05 19:27:59 +00009//
10// This file provides useful services for TableGen backends...
11//
12//===----------------------------------------------------------------------===//
13
14#include "TableGenBackend.h"
15#include "Record.h"
Chris Lattner68478662004-08-01 03:55:39 +000016using namespace llvm;
Brian Gaeke960707c2003-11-11 22:41:34 +000017
Chris Lattnerf5bd1b72003-10-05 19:27:59 +000018void TableGenBackend::EmitSourceFileHeader(const std::string &Desc,
Daniel Dunbar38a22bf2009-07-03 00:10:29 +000019 raw_ostream &OS) const {
Chris Lattnerf5bd1b72003-10-05 19:27:59 +000020 OS << "//===- TableGen'erated file -------------------------------------*-"
21 " C++ -*-===//\n//\n// " << Desc << "\n//\n// Automatically generate"
22 "d file, do not edit!\n//\n//===------------------------------------"
Chris Lattnerc9d99ef2004-08-17 03:08:28 +000023 "----------------------------------===//\n\n";
Chris Lattnerf5bd1b72003-10-05 19:27:59 +000024}
25