Lines Matching defs:MemPtr
126 llvm::Value *MemPtr,
500 /// struct { ptrdiff_t ptr; ptrdiff_t adj; } memptr;
503 /// - method pointers are virtual if (memptr.ptr & 1) is nonzero
504 /// - the this-adjustment is (memptr.adj)
505 /// - the virtual offset is (memptr.ptr - 1)
508 /// - method pointers are virtual if (memptr.adj & 1) is nonzero
509 /// - the this-adjustment is (memptr.adj >> 1)
510 /// - the virtual offset is (memptr.ptr)
517 /// If the member is non-virtual, memptr.ptr is the address of
535 llvm::BasicBlock *FnVirtual = CGF.createBasicBlock("memptr.virtual");
536 llvm::BasicBlock *FnNonVirtual = CGF.createBasicBlock("memptr.nonvirtual");
537 llvm::BasicBlock *FnEnd = CGF.createBasicBlock("memptr.end");
539 // Extract memptr.adj, which is in the second field.
540 llvm::Value *RawAdj = Builder.CreateExtractValue(MemFnPtr, 1, "memptr.adj");
545 Adj = Builder.CreateAShr(Adj, ptrdiff_1, "memptr.adj.shifted");
556 llvm::Value *FnAsInt = Builder.CreateExtractValue(MemFnPtr, 0, "memptr.ptr");
565 IsVirtual = Builder.CreateIsNotNull(IsVirtual, "memptr.isvirtual");
591 "memptr.virtualfn");
598 Builder.CreateIntToPtr(FnAsInt, FTy->getPointerTo(), "memptr.nonvirtualfn");
611 CodeGenFunction &CGF, const Expr *E, Address Base, llvm::Value *MemPtr,
613 assert(MemPtr->getType() == CGM.PtrDiffTy);
622 Builder.CreateInBoundsGEP(Base.getPointer(), MemPtr, "memptr.offset");
689 llvm::Value *isNull = Builder.CreateICmpEQ(src, null, "memptr.isnull");
792 llvm::Constant *MemPtr[2];
808 MemPtr[0] = llvm::ConstantInt::get(CGM.PtrDiffTy, VTableOffset);
809 MemPtr[1] = llvm::ConstantInt::get(CGM.PtrDiffTy,
816 MemPtr[0] = llvm::ConstantInt::get(CGM.PtrDiffTy, VTableOffset + 1);
817 MemPtr[1] = llvm::ConstantInt::get(CGM.PtrDiffTy,
834 MemPtr[0] = llvm::ConstantExpr::getPtrToInt(addr, CGM.PtrDiffTy);
835 MemPtr[1] = llvm::ConstantInt::get(CGM.PtrDiffTy,
840 return llvm::ConstantStruct::getAnon(MemPtr);
899 llvm::Value *LPtr = Builder.CreateExtractValue(L, 0, "lhs.memptr.ptr");
900 llvm::Value *RPtr = Builder.CreateExtractValue(R, 0, "rhs.memptr.ptr");
914 llvm::Value *LAdj = Builder.CreateExtractValue(L, 1, "lhs.memptr.adj");
915 llvm::Value *RAdj = Builder.CreateExtractValue(R, 1, "rhs.memptr.adj");
934 Inequality ? "memptr.ne" : "memptr.eq");
940 llvm::Value *MemPtr,
946 assert(MemPtr->getType() == CGM.PtrDiffTy);
948 llvm::Constant::getAllOnesValue(MemPtr->getType());
949 return Builder.CreateICmpNE(MemPtr, NegativeOne, "memptr.tobool");
953 llvm::Value *Ptr = Builder.CreateExtractValue(MemPtr, 0, "memptr.ptr");
956 llvm::Value *Result = Builder.CreateICmpNE(Ptr, Zero, "memptr.tobool");
962 llvm::Value *Adj = Builder.CreateExtractValue(MemPtr, 1, "memptr.adj");
963 llvm::Value *VirtualBit = Builder.CreateAnd(Adj, One, "memptr.virtualbit");
965 "memptr.isvirtual");