@@ -634,10 +634,6 @@ bool LLParser::parseTopLevelEntities() {
634634 if (parseUseListOrder ())
635635 return true ;
636636 break ;
637- case lltok::kw_uselistorder_bb:
638- if (parseUseListOrderBB ())
639- return true ;
640- break ;
641637 }
642638 }
643639}
@@ -9472,53 +9468,6 @@ bool LLParser::parseUseListOrder(PerFunctionState *PFS) {
94729468 return sortUseListOrder (V, Indexes, Loc);
94739469}
94749470
9475- // / parseUseListOrderBB
9476- // / ::= 'uselistorder_bb' @foo ',' %bar ',' UseListOrderIndexes
9477- bool LLParser::parseUseListOrderBB () {
9478- assert (Lex.getKind () == lltok::kw_uselistorder_bb);
9479- SMLoc Loc = Lex.getLoc ();
9480- Lex.Lex ();
9481-
9482- ValID Fn, Label;
9483- SmallVector<unsigned , 16 > Indexes;
9484- if (parseValID (Fn, /* PFS=*/ nullptr ) ||
9485- parseToken (lltok::comma, " expected comma in uselistorder_bb directive" ) ||
9486- parseValID (Label, /* PFS=*/ nullptr ) ||
9487- parseToken (lltok::comma, " expected comma in uselistorder_bb directive" ) ||
9488- parseUseListOrderIndexes (Indexes))
9489- return true ;
9490-
9491- // Check the function.
9492- GlobalValue *GV;
9493- if (Fn.Kind == ValID::t_GlobalName)
9494- GV = M->getNamedValue (Fn.StrVal );
9495- else if (Fn.Kind == ValID::t_GlobalID)
9496- GV = NumberedVals.get (Fn.UIntVal );
9497- else
9498- return error (Fn.Loc , " expected function name in uselistorder_bb" );
9499- if (!GV)
9500- return error (Fn.Loc ,
9501- " invalid function forward reference in uselistorder_bb" );
9502- auto *F = dyn_cast<Function>(GV);
9503- if (!F)
9504- return error (Fn.Loc , " expected function name in uselistorder_bb" );
9505- if (F->isDeclaration ())
9506- return error (Fn.Loc , " invalid declaration in uselistorder_bb" );
9507-
9508- // Check the basic block.
9509- if (Label.Kind == ValID::t_LocalID)
9510- return error (Label.Loc , " invalid numeric label in uselistorder_bb" );
9511- if (Label.Kind != ValID::t_LocalName)
9512- return error (Label.Loc , " expected basic block name in uselistorder_bb" );
9513- Value *V = F->getValueSymbolTable ()->lookup (Label.StrVal );
9514- if (!V)
9515- return error (Label.Loc , " invalid basic block in uselistorder_bb" );
9516- if (!isa<BasicBlock>(V))
9517- return error (Label.Loc , " expected basic block in uselistorder_bb" );
9518-
9519- return sortUseListOrder (V, Indexes, Loc);
9520- }
9521-
95229471// / ModuleEntry
95239472// / ::= 'module' ':' '(' 'path' ':' STRINGCONSTANT ',' 'hash' ':' Hash ')'
95249473// / Hash ::= '(' UInt32 ',' UInt32 ',' UInt32 ',' UInt32 ',' UInt32 ')'
0 commit comments