]> granicus.if.org Git - clang/commitdiff
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)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@288272 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGObjCGNU.cpp

index 69e84d10238a994718b66d5b1bcdc6d7bb2ae990..3fd8dabd017ec1feb75e72293b4e82e7d8537aa4 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");