diff --git a/llvm/lib/ExecutionEngine/Orc/MachOPlatform.cpp b/llvm/lib/ExecutionEngine/Orc/MachOPlatform.cpp index 793bc3507b023..c769108c1fa99 100644 --- a/llvm/lib/ExecutionEngine/Orc/MachOPlatform.cpp +++ b/llvm/lib/ExecutionEngine/Orc/MachOPlatform.cpp @@ -1274,11 +1274,11 @@ Error MachOPlatform::MachOPlatformPlugin::createObjCRuntimeObject( size_t NumRuntimeSections = 0; for (auto ObjCRuntimeSectionName : ObjCRuntimeObjectSectionsData) - if (auto *Sec = G.findSectionByName(ObjCRuntimeSectionName)) + if (G.findSectionByName(ObjCRuntimeSectionName)) ++NumRuntimeSections; for (auto ObjCRuntimeSectionName : ObjCRuntimeObjectSectionsText) { - if (auto *Sec = G.findSectionByName(ObjCRuntimeSectionName)) { + if (G.findSectionByName(ObjCRuntimeSectionName)) { ++NumRuntimeSections; NeedTextSegment = true; }