From 15c840052e309ec0d5f78190010b04e3354664d9 Mon Sep 17 00:00:00 2001 From: Paul Robinson Date: Fri, 29 Jul 2016 20:46:16 +0000 Subject: [PATCH] Fix CGOpenMPRuntime.cpp for VS2013. NFC. I don't know why these changes work but they do. llvm-svn: 277211 --- clang/lib/CodeGen/CGOpenMPRuntime.cpp | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/clang/lib/CodeGen/CGOpenMPRuntime.cpp b/clang/lib/CodeGen/CGOpenMPRuntime.cpp index ef0d505..a54b596 100644 --- a/clang/lib/CodeGen/CGOpenMPRuntime.cpp +++ b/clang/lib/CodeGen/CGOpenMPRuntime.cpp @@ -5485,15 +5485,15 @@ public: Info[VD].push_back({L, MapType, MapModifier, ReturnDevicePointer}); }; - for (auto *C : CurDir.getClausesOfKind()) + for (auto *C : this->CurDir.getClausesOfKind()) for (auto L : C->component_lists()) InfoGen(L.first, L.second, C->getMapType(), C->getMapTypeModifier(), MapInfo::RPK_None); - for (auto *C : CurDir.getClausesOfKind()) + for (auto *C : this->CurDir.getClausesOfKind()) for (auto L : C->component_lists()) InfoGen(L.first, L.second, OMPC_MAP_to, OMPC_MAP_unknown, MapInfo::RPK_None); - for (auto *C : CurDir.getClausesOfKind()) + for (auto *C : this->CurDir.getClausesOfKind()) for (auto L : C->component_lists()) InfoGen(L.first, L.second, OMPC_MAP_from, OMPC_MAP_unknown, MapInfo::RPK_None); @@ -5502,7 +5502,7 @@ public: // entries as such. If there is no map information for an entry in the // use_device_ptr list, we create one with map type 'alloc' and zero size // section. It is the user fault if that was not mapped before. - for (auto *C : CurDir.getClausesOfKind()) + for (auto *C : this->CurDir.getClausesOfKind()) for (auto L : C->component_lists()) { assert(!L.second.empty() && "Not expecting empty list of components!"); const ValueDecl *VD = L.second.back().getAssociatedDeclaration(); @@ -5535,11 +5535,12 @@ public: // We didn't find any match in our map information - generate a zero // size array section. llvm::Value *Ptr = - CGF.EmitLoadOfLValue(CGF.EmitLValue(IE), SourceLocation()) + this->CGF + .EmitLoadOfLValue(this->CGF.EmitLValue(IE), SourceLocation()) .getScalarVal(); BasePointers.push_back({Ptr, VD}); Pointers.push_back(Ptr); - Sizes.push_back(llvm::Constant::getNullValue(CGF.SizeTy)); + Sizes.push_back(llvm::Constant::getNullValue(this->CGF.SizeTy)); Types.push_back(OMP_MAP_RETURN_PTR | OMP_MAP_FIRST_REF); } @@ -5553,9 +5554,9 @@ public: // Remember the current base pointer index. unsigned CurrentBasePointersIdx = BasePointers.size(); - generateInfoForComponentList(L.MapType, L.MapTypeModifier, L.Components, - BasePointers, Pointers, Sizes, Types, - IsFirstComponentList); + this->generateInfoForComponentList(L.MapType, L.MapTypeModifier, + L.Components, BasePointers, Pointers, + Sizes, Types, IsFirstComponentList); // If this entry relates with a device pointer, set the relevant // declaration and add the 'return pointer' flag. @@ -5632,7 +5633,7 @@ public: return; } - for (auto *C : CurDir.getClausesOfKind()) + for (auto *C : this->CurDir.getClausesOfKind()) for (auto L : C->decl_component_lists(VD)) { assert(L.first == VD && "We got information for the wrong declaration??"); -- 2.7.4