diff options
Diffstat (limited to 'clang/lib/CodeGen/ItaniumCXXABI.cpp')
-rw-r--r-- | clang/lib/CodeGen/ItaniumCXXABI.cpp | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/clang/lib/CodeGen/ItaniumCXXABI.cpp b/clang/lib/CodeGen/ItaniumCXXABI.cpp index 85b52c63220..eefc530ccf1 100644 --- a/clang/lib/CodeGen/ItaniumCXXABI.cpp +++ b/clang/lib/CodeGen/ItaniumCXXABI.cpp @@ -305,13 +305,8 @@ llvm::Value *ItaniumCXXABI::EmitMemberDataPointerAddress(CodeGenFunction &CGF, // Cast the address to the appropriate pointer type, adopting the // address space of the base pointer. - // FIXME: We seem to be losing the "volatile" qualifier on the base pointer. - QualType PtrType = CGF.getContext().getPointerType(MPT->getPointeeType()); - Qualifiers Qs = MPT->getPointeeType().getQualifiers(); - if (AS) - Qs.addAddressSpace(AS); - PtrType = CGF.getContext().getQualifiedType(PtrType, Qs); - const llvm::Type *PType = CGF.ConvertType(PtrType); + const llvm::Type *PType + = CGF.ConvertTypeForMem(MPT->getPointeeType())->getPointerTo(AS); return Builder.CreateBitCast(Addr, PType); } |