summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--clang/lib/CodeGen/CGObjCGNU.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGObjCGNU.cpp b/clang/lib/CodeGen/CGObjCGNU.cpp
index 69e84d10238..3fd8dabd017 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");
OpenPOWER on IntegriCloud