Update unit test API usage (NFC)
authorAdrian Prantl <aprantl@apple.com>
Mon, 29 Nov 2021 21:14:14 +0000 (13:14 -0800)
committerAdrian Prantl <aprantl@apple.com>
Mon, 29 Nov 2021 21:14:35 +0000 (13:14 -0800)
lldb/unittests/Platform/PlatformAppleSimulatorTest.cpp

index 42549e8..87c30de 100644 (file)
@@ -30,10 +30,7 @@ static void testSimPlatformArchHasSimEnvironment(llvm::StringRef name) {
   ASSERT_TRUE(platform_sp);
   int num_arches = 0;
 
-  while (true) {
-    ArchSpec arch;
-    if (!platform_sp->GetSupportedArchitectureAtIndex(num_arches, arch))
-      break;
+  for (auto arch : platform_sp->GetSupportedArchitectures()) {
     EXPECT_EQ(arch.GetTriple().getEnvironment(), llvm::Triple::Simulator);
     num_arches++;
   }