reference, declarationdefinition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced

References

lib/TableGen/TGParser.cpp
  495   switch (Lex.getCode()) {
  533   if (Lex.getCode() != tgtok::Id) {
  538   Record *Result = Records.getClass(Lex.getCurStrVal());
  540     std::string Msg("Couldn't find class '" + Lex.getCurStrVal() + "'");
  541     if (MultiClasses[Lex.getCurStrVal()].get())
  543                Lex.getCurStrVal() + "'");
  548   Lex.Lex();
  558   if (Lex.getCode() != tgtok::Id) {
  563   MultiClass *Result = MultiClasses[Lex.getCurStrVal()].get();
  565     TokError("Couldn't find multiclass '" + Lex.getCurStrVal() + "'");
  567   Lex.Lex();
  580   Result.RefRange.Start = Lex.getLoc();
  591   if (Lex.getCode() != tgtok::less) {
  592     Result.RefRange.End = Lex.getLoc();
  595   Lex.Lex();  // Eat the '<'
  597   if (Lex.getCode() == tgtok::greater) {
  609   if (Lex.getCode() != tgtok::greater) {
  614   Lex.Lex();
  615   Result.RefRange.End = Lex.getLoc();
  630   Result.RefRange.Start = Lex.getLoc();
  636   if (Lex.getCode() != tgtok::less) {
  637     Result.RefRange.End = Lex.getLoc();
  640   Lex.Lex();  // Eat the '<'
  642   if (Lex.getCode() == tgtok::greater) {
  654   if (Lex.getCode() != tgtok::greater) {
  659   Lex.Lex();
  660   Result.RefRange.End = Lex.getLoc();
  685   switch (Lex.getCode()) {
  690     Lex.Lex(); // eat
  703     End = -Lex.getCurIntVal();
  704     Lex.Lex();
  731   while (Lex.getCode() == tgtok::comma) {
  732     Lex.Lex();  // Eat the comma.
  746   if (Lex.getCode() != tgtok::less)
  749   SMLoc StartLoc = Lex.getLoc();
  750   Lex.Lex(); // eat the '<'
  756   if (Lex.getCode() != tgtok::greater) {
  760   Lex.Lex();   // eat the '>'.
  768   if (Lex.getCode() != tgtok::l_brace)
  771   SMLoc StartLoc = Lex.getLoc();
  772   Lex.Lex(); // eat the '{'
  778   if (Lex.getCode() != tgtok::r_brace) {
  782   Lex.Lex();   // eat the '}'.
  798   switch (Lex.getCode()) {
  800   case tgtok::String: Lex.Lex(); return StringRecTy::get();
  801   case tgtok::Code:   Lex.Lex(); return CodeRecTy::get();
  802   case tgtok::Bit:    Lex.Lex(); return BitRecTy::get();
  803   case tgtok::Int:    Lex.Lex(); return IntRecTy::get();
  804   case tgtok::Dag:    Lex.Lex(); return DagRecTy::get();
  810     if (Lex.Lex() != tgtok::less) { // Eat 'bits'
  814     if (Lex.Lex() != tgtok::IntVal) {  // Eat '<'
  818     uint64_t Val = Lex.getCurIntVal();
  819     if (Lex.Lex() != tgtok::greater) {  // Eat count.
  823     Lex.Lex();  // Eat '>'
  827     if (Lex.Lex() != tgtok::less) { // Eat 'bits'
  831     Lex.Lex();  // Eat '<'
  835     if (Lex.getCode() != tgtok::greater) {
  839     Lex.Lex();  // Eat '>'
  900   switch (Lex.getCode()) {
  912     switch (Lex.getCode()) {
  915       Lex.Lex();  // eat the operation
  927       Lex.Lex();  // eat the operation
  931       Lex.Lex();  // eat the operation
  935       Lex.Lex();
  940       Lex.Lex();  // eat the operation
  945     if (Lex.getCode() != tgtok::l_paren) {
  949     Lex.Lex();  // eat the '('
 1007     if (Lex.getCode() != tgtok::r_paren) {
 1011     Lex.Lex();  // eat the ')'
 1017     Lex.Lex(); // eat the operation
 1023     if (Lex.getCode() != tgtok::l_paren) {
 1027     Lex.Lex(); // eat the '('
 1033     if (Lex.getCode() != tgtok::r_paren) {
 1037     Lex.Lex(); // eat the ')'
 1059     tgtok::TokKind OpTok = Lex.getCode();
 1060     SMLoc OpLoc = Lex.getLoc();
 1061     Lex.Lex();  // eat the operation
 1136     if (Lex.getCode() != tgtok::l_paren) {
 1140     Lex.Lex();  // eat the '('
 1145       SMLoc InitLoc = Lex.getLoc();
 1215       if (Lex.getCode() != tgtok::comma)
 1217       Lex.Lex();  // eat the ','
 1220     if (Lex.getCode() != tgtok::r_paren) {
 1224     Lex.Lex();  // eat the ')'
 1255     SMLoc OpLoc = Lex.getLoc();
 1256     Lex.Lex(); // eat the operation
 1257     if (Lex.getCode() != tgtok::l_paren) {
 1262     if (Lex.Lex() != tgtok::Id) { // eat the '('
 1267     Init *LHS = StringInit::get(Lex.getCurStrVal());
 1276     if (Lex.Lex() != tgtok::comma) { // eat the id
 1280     Lex.Lex();  // eat the ','
 1286     if (Lex.getCode() != tgtok::comma) {
 1290     Lex.Lex();  // eat the ','
 1343     if (Lex.getCode() != tgtok::r_paren) {
 1347     Lex.Lex();  // eat the ')'
 1371     tgtok::TokKind LexCode = Lex.getCode();
 1372     Lex.Lex();  // eat the operation
 1387     if (Lex.getCode() != tgtok::l_paren) {
 1391     Lex.Lex();  // eat the '('
 1396     if (Lex.getCode() != tgtok::comma) {
 1400     Lex.Lex();  // eat the ','
 1402     SMLoc MHSLoc = Lex.getLoc();
 1407     if (Lex.getCode() != tgtok::comma) {
 1411     Lex.Lex();  // eat the ','
 1413     SMLoc RHSLoc = Lex.getLoc();
 1418     if (Lex.getCode() != tgtok::r_paren) {
 1422     Lex.Lex();  // eat the ')'
 1511     Lex.Lex(); // eat the operation
 1512     if (Lex.getCode() != tgtok::l_paren) {
 1516     Lex.Lex(); // eat the '('
 1529     if (Lex.getCode() != tgtok::comma) {
 1533     Lex.Lex(); // eat the ','
 1553     if (Lex.getCode() != tgtok::comma) {
 1558     if (Lex.Lex() != tgtok::Id) { // eat the ','
 1563     Init *A = StringInit::get(Lex.getCurStrVal());
 1571     if (Lex.Lex() != tgtok::comma) { // eat the id
 1576     if (Lex.Lex() != tgtok::Id) { // eat the ','
 1581     Init *B = StringInit::get(Lex.getCurStrVal());
 1589     if (Lex.Lex() != tgtok::comma) { // eat the id
 1593     Lex.Lex(); // eat the ','
 1625     if (Lex.getCode() != tgtok::r_paren) {
 1629     Lex.Lex(); // eat the ')'
 1645   if (Lex.getCode() != tgtok::less) {
 1649   Lex.Lex();  // eat the <
 1658   if (Lex.getCode() != tgtok::greater) {
 1662   Lex.Lex();  // eat the >
 1668   Lex.Lex();  // eat the operation 'cond'
 1670   if (Lex.getCode() != tgtok::l_paren) {
 1674   Lex.Lex();  // eat the '('
 1680     if (Lex.getCode() == tgtok::r_paren) {
 1681       Lex.Lex(); // eat the ')'
 1690     if (Lex.getCode() != tgtok::colon) {
 1694     Lex.Lex(); // eat the ':'
 1701     if (Lex.getCode() == tgtok::r_paren) {
 1702       Lex.Lex(); // eat the ')'
 1706     if (Lex.getCode() != tgtok::comma) {
 1710     Lex.Lex();  // eat the ','
 1776   switch (Lex.getCode()) {
 1781     Lex.Lex();  // Skip '#'.
 1783   case tgtok::IntVal: R = IntInit::get(Lex.getCurIntVal()); Lex.Lex(); break;
 1783   case tgtok::IntVal: R = IntInit::get(Lex.getCurIntVal()); Lex.Lex(); break;
 1785     auto BinaryVal = Lex.getCurBinaryIntVal();
 1790     Lex.Lex();
 1794     std::string Val = Lex.getCurStrVal();
 1795     Lex.Lex();
 1798     while (Lex.getCode() == tgtok::StrVal) {
 1799       Val += Lex.getCurStrVal();
 1800       Lex.Lex();
 1807     R = CodeInit::get(Lex.getCurStrVal(), Lex.getLoc());
 1807     R = CodeInit::get(Lex.getCurStrVal(), Lex.getLoc());
 1808     Lex.Lex();
 1812     Lex.Lex();
 1815     SMLoc NameLoc = Lex.getLoc();
 1816     StringInit *Name = StringInit::get(Lex.getCurStrVal());
 1817     if (Lex.Lex() != tgtok::less)  // consume the Id.
 1821     if (Lex.Lex() == tgtok::greater) {
 1839     if (Lex.getCode() != tgtok::greater) {
 1843     Lex.Lex();  // eat the '>'
 1880     SMLoc BraceLoc = Lex.getLoc();
 1881     Lex.Lex(); // eat the '{'
 1884     if (Lex.getCode() != tgtok::r_brace) {
 1888     if (Lex.getCode() != tgtok::r_brace) {
 1892     Lex.Lex();  // eat the '}'
 1931     Lex.Lex(); // eat the '['
 1947     if (Lex.getCode() != tgtok::r_square) {
 1952     if (Lex.getCode() != tgtok::r_square) {
 1956     Lex.Lex();  // eat the ']'
 1959     if (Lex.getCode() == tgtok::less) {
 1961       Lex.Lex();  // eat the '<'
 1969       if (Lex.getCode() != tgtok::greater) {
 1973       Lex.Lex();  // eat the '>'
 2026     Lex.Lex();   // eat the '('
 2027     if (Lex.getCode() != tgtok::Id && Lex.getCode() != tgtok::XCast) {
 2027     if (Lex.getCode() != tgtok::Id && Lex.getCode() != tgtok::XCast) {
 2037     if (Lex.getCode() == tgtok::colon) {
 2038       if (Lex.Lex() != tgtok::VarName) { // eat the ':'
 2042       OperatorName = StringInit::get(Lex.getCurStrVal());
 2043       Lex.Lex();  // eat the VarName.
 2047     if (Lex.getCode() != tgtok::r_paren) {
 2052     if (Lex.getCode() != tgtok::r_paren) {
 2056     Lex.Lex();  // eat the ')'
 2110     switch (Lex.getCode()) {
 2117       SMLoc CurlyLoc = Lex.getLoc();
 2118       Lex.Lex(); // eat the '{'
 2132       if (Lex.getCode() != tgtok::r_brace) {
 2136       Lex.Lex();
 2140       SMLoc SquareLoc = Lex.getLoc();
 2141       Lex.Lex(); // eat the '['
 2153       if (Lex.getCode() != tgtok::r_square) {
 2157       Lex.Lex();
 2161       if (Lex.Lex() != tgtok::Id) {  // eat the .
 2165       StringInit *FieldName = StringInit::get(Lex.getCurStrVal());
 2167         TokError("Cannot access field '" + Lex.getCurStrVal() + "' of value '" +
 2172       Lex.Lex();  // eat field name
 2177       SMLoc PasteLoc = Lex.getLoc();
 2186         Lex.Lex();  // Eat the '#'.
 2188         switch (Lex.getCode()) {
 2217       Lex.Lex();  // Eat the '#'.
 2218       switch (Lex.getCode()) {
 2271     if (Lex.getCode() == tgtok::VarName) {
 2273       StringInit *VarName = StringInit::get(Lex.getCurStrVal());
 2275       Lex.Lex();
 2286       if (Lex.getCode() == tgtok::colon) {
 2287         if (Lex.Lex() != tgtok::VarName) { // eat the ':'
 2292         VarName = StringInit::get(Lex.getCurStrVal());
 2293         Lex.Lex();  // eat the VarName.
 2298     if (Lex.getCode() != tgtok::comma) break;
 2299     Lex.Lex(); // eat the ','
 2335   while (Lex.getCode() == tgtok::comma) {
 2336     Lex.Lex();  // Eat the comma
 2339     if (Lex.getCode() == tgtok::r_square)
 2375   bool HasField = Lex.getCode() == tgtok::Field;
 2376   if (HasField) Lex.Lex();
 2381   if (Lex.getCode() != tgtok::Id) {
 2386   std::string Str = Lex.getCurStrVal();
 2392   SMLoc IdLoc = Lex.getLoc();
 2394   Lex.Lex();
 2411   if (Lex.getCode() == tgtok::equal) {
 2412     Lex.Lex();
 2413     SMLoc ValLoc = Lex.getLoc();
 2435   if (Lex.getCode() != tgtok::Id) {
 2440   Init *DeclName = StringInit::get(Lex.getCurStrVal());
 2441   Lex.Lex();
 2444   if (Lex.getCode() != tgtok::equal) {
 2448   Lex.Lex();  // Eat the '='
 2453   switch (Lex.getCode()) {
 2455     Lex.Lex(); // eat the '{'
 2457     if (Lex.getCode() != tgtok::r_brace) {
 2461     Lex.Lex();
 2466     SMLoc ValueLoc = Lex.getLoc();
 2520   assert(Lex.getCode() == tgtok::less && "Not a template arg list!");
 2521   Lex.Lex(); // eat the '<'
 2532   while (Lex.getCode() == tgtok::comma) {
 2533     Lex.Lex(); // eat the ','
 2536     SMLoc Loc = Lex.getLoc();
 2548   if (Lex.getCode() != tgtok::greater)
 2550   Lex.Lex(); // eat the '>'.
 2559   if (Lex.getCode() != tgtok::Let) {
 2563     if (Lex.getCode() != tgtok::semi)
 2565     Lex.Lex();
 2570   if (Lex.Lex() != tgtok::Id)
 2573   SMLoc IdLoc = Lex.getLoc();
 2574   StringInit *FieldName = StringInit::get(Lex.getCurStrVal());
 2575   Lex.Lex();  // eat the field name.
 2582   if (Lex.getCode() != tgtok::equal)
 2584   Lex.Lex();  // eat the '='.
 2595   if (Lex.getCode() != tgtok::semi)
 2597   Lex.Lex();
 2611   if (Lex.getCode() == tgtok::semi) {
 2612     Lex.Lex();
 2616   if (Lex.getCode() != tgtok::l_brace)
 2619   Lex.Lex();
 2621   while (Lex.getCode() != tgtok::r_brace)
 2626   Lex.Lex();
 2663   if (Lex.getCode() == tgtok::colon) {
 2664     Lex.Lex();
 2676       if (Lex.getCode() != tgtok::comma) break;
 2677       Lex.Lex(); // eat ','.
 2694   SMLoc DefLoc = Lex.getLoc();
 2695   assert(Lex.getCode() == tgtok::Def && "Unknown tok");
 2696   Lex.Lex();  // Eat the 'def' token.
 2721   assert(Lex.getCode() == tgtok::Defset);
 2722   Lex.Lex(); // Eat the 'defset' token
 2725   Defset.Loc = Lex.getLoc();
 2733   if (Lex.getCode() != tgtok::Id)
 2735   StringInit *DeclName = StringInit::get(Lex.getCurStrVal());
 2739   if (Lex.Lex() != tgtok::equal) // Eat the identifier
 2741   if (Lex.Lex() != tgtok::l_brace) // Eat the '='
 2743   SMLoc BraceLoc = Lex.getLoc();
 2744   Lex.Lex(); // Eat the '{'
 2752   if (Lex.getCode() != tgtok::r_brace) {
 2756   Lex.Lex();  // Eat the '}'
 2770   SMLoc Loc = Lex.getLoc();
 2771   assert(Lex.getCode() == tgtok::Foreach && "Unknown tok");
 2772   Lex.Lex();  // Eat the 'for' token.
 2781   if (Lex.getCode() != tgtok::In)
 2783   Lex.Lex();  // Eat the in
 2788   if (Lex.getCode() != tgtok::l_brace) {
 2793     SMLoc BraceLoc = Lex.getLoc();
 2795     Lex.Lex();  // eat the '{'.
 2801     if (Lex.getCode() != tgtok::r_brace) {
 2805     Lex.Lex();  // Eat the }
 2820   assert(Lex.getCode() == tgtok::Class && "Unexpected token!");
 2821   Lex.Lex();
 2823   if (Lex.getCode() != tgtok::Id)
 2826   Record *CurRec = Records.getClass(Lex.getCurStrVal());
 2837         std::make_unique<Record>(Lex.getCurStrVal(), Lex.getLoc(), Records,
 2837         std::make_unique<Record>(Lex.getCurStrVal(), Lex.getLoc(), Records,
 2842   Lex.Lex(); // eat the name.
 2845   if (Lex.getCode() == tgtok::less)
 2860     if (Lex.getCode() != tgtok::Id) {
 2866     StringInit *Name = StringInit::get(Lex.getCurStrVal());
 2867     SMLoc NameLoc = Lex.getLoc();
 2868     Lex.Lex();  // Eat the identifier.
 2878     if (Lex.getCode() != tgtok::equal) {
 2883     Lex.Lex();  // eat the '='.
 2894     if (Lex.getCode() != tgtok::comma)
 2896     Lex.Lex();  // eat the comma.
 2907   assert(Lex.getCode() == tgtok::Let && "Unexpected token");
 2908   Lex.Lex();
 2916   if (Lex.getCode() != tgtok::In)
 2918   Lex.Lex();
 2921   if (Lex.getCode() != tgtok::l_brace) {
 2926     SMLoc BraceLoc = Lex.getLoc();
 2928     Lex.Lex();  // eat the '{'.
 2934     if (Lex.getCode() != tgtok::r_brace) {
 2938     Lex.Lex();
 2957   assert(Lex.getCode() == tgtok::MultiClass && "Unexpected token");
 2958   Lex.Lex();  // Eat the multiclass token.
 2960   if (Lex.getCode() != tgtok::Id)
 2962   std::string Name = Lex.getCurStrVal();
 2966                     std::make_unique<MultiClass>(Name, Lex.getLoc(),Records)));
 2972   Lex.Lex();  // Eat the identifier.
 2975   if (Lex.getCode() == tgtok::less)
 2982   if (Lex.getCode() == tgtok::colon) {
 2985     Lex.Lex();
 2998       if (Lex.getCode() != tgtok::comma) break;
 2999       Lex.Lex(); // eat ','.
 3004   if (Lex.getCode() != tgtok::l_brace) {
 3007     if (Lex.getCode() != tgtok::semi)
 3009     Lex.Lex();  // eat the ';'.
 3011     if (Lex.Lex() == tgtok::r_brace)  // eat the '{'.
 3014     while (Lex.getCode() != tgtok::r_brace) {
 3015       switch (Lex.getCode()) {
 3028     Lex.Lex();  // eat the '}'.
 3040   assert(Lex.getCode() == tgtok::Defm && "Unexpected token!");
 3041   Lex.Lex(); // eat the defm
 3055   if (Lex.getCode() != tgtok::colon)
 3065   Lex.Lex();
 3067   SMLoc SubClassLoc = Lex.getLoc();
 3109     if (Lex.getCode() != tgtok::comma) break;
 3110     Lex.Lex(); // eat ','.
 3112     if (Lex.getCode() != tgtok::Id)
 3115     SubClassLoc = Lex.getLoc();
 3119     InheritFromClass = (Records.getClass(Lex.getCurStrVal()) != nullptr);
 3143       if (Lex.getCode() != tgtok::comma) break;
 3144       Lex.Lex(); // eat ','.
 3156   if (Lex.getCode() != tgtok::semi)
 3158   Lex.Lex();
 3171   switch (Lex.getCode()) {
 3199   while (isObjectStart(Lex.getCode())) {
 3207   Lex.Lex(); // Prime the lexer.
 3211   if (Lex.getCode() == tgtok::Eof)
lib/TableGen/TGParser.h
  130     return Error(Lex.getLoc(), Msg);
  133     return Lex.getDependencies();