From b7e4b90ddd6cd0b060eb3468cd38cb7a3483777c Mon Sep 17 00:00:00 2001 From: John McCall Date: Wed, 30 Nov 2016 20:46:55 +0000 Subject: [PATCH] Prospective MSVC workaround. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@288272 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/CGObjCGNU.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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"); -- 2.50.1