From: John McCall Date: Wed, 30 Nov 2016 20:46:55 +0000 (+0000) Subject: Prospective MSVC workaround. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b7e4b90ddd6cd0b060eb3468cd38cb7a3483777c;p=clang Prospective MSVC workaround. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@288272 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/CGObjCGNU.cpp b/lib/CodeGen/CGObjCGNU.cpp index 69e84d1023..3fd8dabd01 100644 --- a/lib/CodeGen/CGObjCGNU.cpp +++ b/lib/CodeGen/CGObjCGNU.cpp @@ -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");