mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-17 17:06:59 +00:00
[TableGen] Use range-based for loops. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256626 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
e6b50232bc
commit
65438a7a79
@ -989,8 +989,8 @@ bool MatchableInfo::validate(StringRef CommentDelimiter, bool Hack) const {
|
||||
// Also, check for instructions which reference the operand multiple times;
|
||||
// this implies a constraint we would not honor.
|
||||
std::set<std::string> OperandNames;
|
||||
for (unsigned i = 0, e = AsmOperands.size(); i != e; ++i) {
|
||||
StringRef Tok = AsmOperands[i].Token;
|
||||
for (const AsmOperand &Op : AsmOperands) {
|
||||
StringRef Tok = Op.Token;
|
||||
if (Tok[0] == '$' && Tok.find(':') != StringRef::npos)
|
||||
PrintFatalError(TheDef->getLoc(),
|
||||
"matchable with operand modifier '" + Tok +
|
||||
@ -2146,8 +2146,8 @@ static void emitIsSubclass(CodeGenTarget &Target,
|
||||
if (!SuperClasses.empty()) {
|
||||
SS << " switch (B) {\n";
|
||||
SS << " default: return false;\n";
|
||||
for (unsigned i = 0, e = SuperClasses.size(); i != e; ++i)
|
||||
SS << " case " << SuperClasses[i].str() << ": return true;\n";
|
||||
for (StringRef SC : SuperClasses)
|
||||
SS << " case " << SC << ": return true;\n";
|
||||
SS << " }\n";
|
||||
} else {
|
||||
// No case statement to emit
|
||||
|
Loading…
Reference in New Issue
Block a user