ABataev added inline comments.
================ Comment at: clang/lib/CodeGen/CGOpenMPRuntime.cpp:8072-8088 + QualType CanonType = + I->getAssociatedExpression()->getType().getCanonicalType(); + if (CanonType->isSpecificBuiltinType(BuiltinType::OMPArraySection)) { + const auto *OASE = cast<OMPArraySectionExpr>( + I->getAssociatedExpression()->IgnoreParenImpCasts()); + QualType BaseType = + OMPArraySectionExpr::getBaseOriginalType(OASE->getBase()); ---------------- Why not something like: ``` llvm::Value *TypeSize = CGF.getTypeSize(CanonType); llvm::Value *Idx = CGF.Builder.CreateSub(TypeSize, 1); Address HB = CGF.Builder.CreateGEP( CGF.Builder.CreatePointerBitCastOrAddrSpaceCast( LowestElem, CGF.VoidPtrTy, CGF.Int8Ty), Idx); ``` Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122852/new/ https://reviews.llvm.org/D122852 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits