Add a C++11 ThreadPool implementation in LLVM
[oota-llvm.git] / unittests / Support / TargetRegistry.cpp
index dd5ef431ae07c087f2a2a1207a52184a9a8f2402..ae89c8b6493038bfd67c63a885771a5d031bbfc7 100644 (file)
@@ -22,9 +22,8 @@ TEST(TargetRegistry, TargetHasArchType) {
 
   llvm::InitializeAllTargetInfos();
 
-  llvm::TargetRegistry RegistryRoot;
-  for (const auto &Target : RegistryRoot) {
-    StringRef Name = Target.getName();
+  for (const Target &T : TargetRegistry::targets()) {
+    StringRef Name = T.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.