Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(169)

Side by Side Diff: utils/TableGen/TGParser.h

Issue 7792066: [llvm] Conditionally include target intrinsics, based on --enable-target Base URL: https://llvm.org/svn/llvm-project/llvm/trunk/
Patch Set: cleanups Created 9 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « utils/TableGen/TGLexer.cpp ('k') | utils/TableGen/TableGen.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 //===- TGParser.h - Parser for TableGen Files -------------------*- C++ -*-===// 1 //===- TGParser.h - Parser for TableGen Files -------------------*- C++ -*-===//
2 // 2 //
3 // The LLVM Compiler Infrastructure 3 // The LLVM Compiler Infrastructure
4 // 4 //
5 // This file is distributed under the University of Illinois Open Source 5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details. 6 // License. See LICENSE.TXT for details.
7 // 7 //
8 //===----------------------------------------------------------------------===// 8 //===----------------------------------------------------------------------===//
9 // 9 //
10 // This class represents the Parser for tablegen files. 10 // This class represents the Parser for tablegen files.
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 std::vector<std::vector<LetRecord> > LetStack; 46 std::vector<std::vector<LetRecord> > LetStack;
47 std::map<std::string, MultiClass*> MultiClasses; 47 std::map<std::string, MultiClass*> MultiClasses;
48 48
49 /// CurMultiClass - If we are parsing a 'multiclass' definition, this is the 49 /// CurMultiClass - If we are parsing a 'multiclass' definition, this is the
50 /// current value. 50 /// current value.
51 MultiClass *CurMultiClass; 51 MultiClass *CurMultiClass;
52 52
53 // Record tracker 53 // Record tracker
54 RecordKeeper &Records; 54 RecordKeeper &Records;
55 public: 55 public:
56 TGParser(SourceMgr &SrcMgr, RecordKeeper &records) : 56 TGParser(SourceMgr &SrcMgr, RecordKeeper &records,
57 Lex(SrcMgr), CurMultiClass(0), Records(records) {} 57 std::vector<std::string> PreProcDefines)
58 58 : Lex(SrcMgr, PreProcDefines), CurMultiClass(0), Records(records) {}
59
59 /// ParseFile - Main entrypoint for parsing a tblgen file. These parser 60 /// ParseFile - Main entrypoint for parsing a tblgen file. These parser
60 /// routines return true on error, or false on success. 61 /// routines return true on error, or false on success.
61 bool ParseFile(); 62 bool ParseFile();
62 63
63 bool Error(SMLoc L, const Twine &Msg) const { 64 bool Error(SMLoc L, const Twine &Msg) const {
64 PrintError(L, Msg); 65 PrintError(L, Msg);
65 return true; 66 return true;
66 } 67 }
67 bool TokError(const Twine &Msg) const { 68 bool TokError(const Twine &Msg) const {
68 return Error(Lex.getLoc(), Msg); 69 return Error(Lex.getLoc(), Msg);
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 RecTy *ParseOperatorType(); 114 RecTy *ParseOperatorType();
114 std::string ParseObjectName(); 115 std::string ParseObjectName();
115 Record *ParseClassID(); 116 Record *ParseClassID();
116 MultiClass *ParseMultiClassID(); 117 MultiClass *ParseMultiClassID();
117 Record *ParseDefmID(); 118 Record *ParseDefmID();
118 }; 119 };
119 120
120 } // end namespace llvm 121 } // end namespace llvm
121 122
122 #endif 123 #endif
OLDNEW
« no previous file with comments | « utils/TableGen/TGLexer.cpp ('k') | utils/TableGen/TableGen.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698