Replacing a range-based for loop with an old-style for loop. This code was previously causing a warning with MSVC about a compiler-generated local variable because TargetRegistry::begin() and end() are static member functions. NFC.
llvm-svn: 236990
This commit is contained in:
parent
3c1d572799
commit
73cb576c35
@ -23,8 +23,9 @@ TEST(TargetRegistry, TargetHasArchType) {
|
||||
llvm::InitializeAllTargetInfos();
|
||||
|
||||
llvm::TargetRegistry RegistryRoot;
|
||||
for (const auto &Target : RegistryRoot) {
|
||||
StringRef Name = Target.getName();
|
||||
for (auto &I = TargetRegistry::begin(), &E = TargetRegistry::end();
|
||||
I != E; ++I) {
|
||||
StringRef Name = I->getName();
|
||||
// There is really no way (at present) to ask a Target whether it targets
|
||||
// a specific architecture, because the logic for that is buried in a
|
||||
// predicate.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user