Prospective MSVC workaround.
authorJohn McCall <rjmccall@apple.com>
Wed, 30 Nov 2016 20:46:55 +0000 (20:46 +0000)
committerJohn McCall <rjmccall@apple.com>
Wed, 30 Nov 2016 20:46:55 +0000 (20:46 +0000)
llvm-svn: 288272

clang/lib/CodeGen/CGObjCGNU.cpp

index 69e84d1..3fd8dab 100644 (file)
@@ -2450,7 +2450,8 @@ llvm::Function *CGObjCGNU::ModuleInitFunction() {
   llvm::GlobalVariable *selectorList = [&] {
     ConstantInitBuilder builder(CGM);
     auto selectors = builder.beginArray(selStructTy);
-    for (auto &entry : SelectorTable) {
+    auto &table = SelectorTable; // MSVC workaround
+    for (auto &entry : table) {
 
       std::string selNameStr = entry.first.getAsString();
       llvm::Constant *selName = ExportUniqueString(selNameStr, ".objc_sel_name");