From f00e2c09bea89c73aa6501ff5430586d35372fca Mon Sep 17 00:00:00 2001 From: John McCall Date: Wed, 30 Nov 2016 20:46:55 +0000 Subject: [PATCH] Prospective MSVC workaround. llvm-svn: 288272 --- clang/lib/CodeGen/CGObjCGNU.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/clang/lib/CodeGen/CGObjCGNU.cpp b/clang/lib/CodeGen/CGObjCGNU.cpp index 69e84d1..3fd8dab 100644 --- a/clang/lib/CodeGen/CGObjCGNU.cpp +++ b/clang/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.7.4