We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 342a691 + 6d3971d commit 1f49797Copy full SHA for 1f49797
llvm/lib/AsmParser/LLParser.cpp
@@ -315,11 +315,10 @@ bool LLParser::validateEndOfModule(bool UpgradeDebugInfo) {
315
return error(NT.second.second,
316
"use of undefined type '%" + Twine(NT.first) + "'");
317
318
- for (StringMap<std::pair<Type*, LocTy> >::iterator I =
319
- NamedTypes.begin(), E = NamedTypes.end(); I != E; ++I)
320
- if (I->second.second.isValid())
321
- return error(I->second.second,
322
- "use of undefined type named '" + I->getKey() + "'");
+ for (const auto &[Name, TypeInfo] : NamedTypes)
+ if (TypeInfo.second.isValid())
+ return error(TypeInfo.second,
+ "use of undefined type named '" + Name + "'");
323
324
if (!ForwardRefComdats.empty())
325
return error(ForwardRefComdats.begin()->second,
0 commit comments