summaryrefslogtreecommitdiffstats
path: root/llvm/utils/TableGen/ClangASTNodesEmitter.h
diff options
context:
space:
mode:
authorPeter Collingbourne <peter@pcc.me.uk>2011-10-06 13:21:42 +0000
committerPeter Collingbourne <peter@pcc.me.uk>2011-10-06 13:21:42 +0000
commit51eaba7a5464898e45f5475b93846ca94575ccb7 (patch)
treeb9772c18d6d86b65fece9edaaa773f9932a64061 /llvm/utils/TableGen/ClangASTNodesEmitter.h
parentd6dba31526c84f7db6ad7c29db85391248800d91 (diff)
downloadbcm5719-llvm-51eaba7a5464898e45f5475b93846ca94575ccb7.tar.gz
bcm5719-llvm-51eaba7a5464898e45f5475b93846ca94575ccb7.zip
Remove the Clang tblgen backends from LLVM.
llvm-svn: 141293
Diffstat (limited to 'llvm/utils/TableGen/ClangASTNodesEmitter.h')
-rw-r--r--llvm/utils/TableGen/ClangASTNodesEmitter.h84
1 files changed, 0 insertions, 84 deletions
diff --git a/llvm/utils/TableGen/ClangASTNodesEmitter.h b/llvm/utils/TableGen/ClangASTNodesEmitter.h
deleted file mode 100644
index edd9316544e..00000000000
--- a/llvm/utils/TableGen/ClangASTNodesEmitter.h
+++ /dev/null
@@ -1,84 +0,0 @@
-//===- ClangASTNodesEmitter.h - Generate Clang AST node tables -*- C++ -*--===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-//
-// These tablegen backends emit Clang AST node tables
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef CLANGAST_EMITTER_H
-#define CLANGAST_EMITTER_H
-
-#include "llvm/TableGen/TableGenBackend.h"
-#include "llvm/TableGen/Record.h"
-#include <string>
-#include <cctype>
-#include <map>
-
-namespace llvm {
-
-/// ClangASTNodesEmitter - The top-level class emits .inc files containing
-/// declarations of Clang statements.
-///
-class ClangASTNodesEmitter : public TableGenBackend {
- // A map from a node to each of its derived nodes.
- typedef std::multimap<Record*, Record*> ChildMap;
- typedef ChildMap::const_iterator ChildIterator;
-
- RecordKeeper &Records;
- Record Root;
- const std::string &BaseSuffix;
-
- // Create a macro-ized version of a name
- static std::string macroName(std::string S) {
- for (unsigned i = 0; i < S.size(); ++i)
- S[i] = std::toupper(S[i]);
-
- return S;
- }
-
- // Return the name to be printed in the base field. Normally this is
- // the record's name plus the base suffix, but if it is the root node and
- // the suffix is non-empty, it's just the suffix.
- std::string baseName(Record &R) {
- if (&R == &Root && !BaseSuffix.empty())
- return BaseSuffix;
-
- return R.getName() + BaseSuffix;
- }
-
- std::pair<Record *, Record *> EmitNode (const ChildMap &Tree, raw_ostream& OS,
- Record *Base);
-public:
- explicit ClangASTNodesEmitter(RecordKeeper &R, const std::string &N,
- const std::string &S)
- : Records(R), Root(N, SMLoc(), R), BaseSuffix(S)
- {}
-
- // run - Output the .inc file contents
- void run(raw_ostream &OS);
-};
-
-/// ClangDeclContextEmitter - Emits an addendum to a .inc file to enumerate the
-/// clang declaration contexts.
-///
-class ClangDeclContextEmitter : public TableGenBackend {
- RecordKeeper &Records;
-
-public:
- explicit ClangDeclContextEmitter(RecordKeeper &R)
- : Records(R)
- {}
-
- // run - Output the .inc file contents
- void run(raw_ostream &OS);
-};
-
-} // End llvm namespace
-
-#endif
OpenPOWER on IntegriCloud