File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -69,8 +69,8 @@ class RootSignatureParser {
6969 bool parseDescriptorTable ();
7070 bool parseDescriptorTableClause ();
7171
72- // / Each unique ParamType will have a custom parse method defined that we can
73- // / use to invoke the parameters .
72+ // / Each unique ParamType will have a custom parse method defined that can be
73+ // / invoked to set a value to the referenced paramtype .
7474 // /
7575 // / This function will switch on the ParamType using std::visit and dispatch
7676 // / onto the corresponding parse method
@@ -86,7 +86,7 @@ class RootSignatureParser {
8686 // / TokenKind::kw_space, &Clause.Space
8787 // / };
8888 // / SmallDenseSet<TokenKind> Mandatory = {
89- // / TokenKind::kw_numDescriptors
89+ // / TokenKind::bReg
9090 // / };
9191 // /
9292 // / We can read it is as:
Original file line number Diff line number Diff line change @@ -210,6 +210,8 @@ bool RootSignatureParser::parseRegister(Register *Register) {
210210 " Expects to only be invoked starting at given keyword" );
211211
212212 switch (CurToken.Kind ) {
213+ default :
214+ llvm_unreachable (" Switch for consumed token was not provided" );
213215 case TokenKind::bReg:
214216 Register->ViewType = RegisterType::BReg;
215217 break ;
@@ -222,8 +224,6 @@ bool RootSignatureParser::parseRegister(Register *Register) {
222224 case TokenKind::sReg :
223225 Register->ViewType = RegisterType::SReg;
224226 break ;
225- default :
226- break ; // Unreachable given Try + assert pattern
227227 }
228228
229229 if (handleUIntLiteral (&Register->Number ))
You can’t perform that action at this time.
0 commit comments