diff --git a/clang/lib/CodeGen/CGBuiltin.cpp b/clang/lib/CodeGen/CGBuiltin.cpp --- a/clang/lib/CodeGen/CGBuiltin.cpp +++ b/clang/lib/CodeGen/CGBuiltin.cpp @@ -1778,8 +1778,9 @@ auto AL = ApplyDebugLocation::CreateArtificial(*this); CharUnits Offset; - Address BufAddr = Address::deprecated( - Builder.CreateLoad(GetAddrOfLocalVar(Args[0]), "buf"), BufferAlignment); + Address BufAddr = + Address(Builder.CreateLoad(GetAddrOfLocalVar(Args[0]), "buf"), Int8Ty, + BufferAlignment); Builder.CreateStore(Builder.getInt8(Layout.getSummaryByte()), Builder.CreateConstByteGEP(BufAddr, Offset++, "summary")); Builder.CreateStore(Builder.getInt8(Layout.getNumArgsByte()), @@ -2108,7 +2109,8 @@ ? Types[Context.VoidPtrTy] : Types[CanonicalType]; - Address FieldAddress = Address::deprecated(FieldPtr, Align); + Address FieldAddress = + Address(FieldPtr, CGF.ConvertTypeForMem(FD->getType()), Align); FieldPtr = CGF.Builder.CreateLoad(FieldAddress); // FIXME Need to handle bitfield here @@ -9598,7 +9600,7 @@ llvm::Value *ValOffsetPtr = Builder.CreateGEP(Int64Ty, ValPtr, Builder.getInt32(i)); Address Addr = - Address::deprecated(ValOffsetPtr, CharUnits::fromQuantity(8)); + Address(ValOffsetPtr, Int64Ty, CharUnits::fromQuantity(8)); ToRet = Builder.CreateStore(Builder.CreateExtractValue(Val, i), Addr); } return ToRet; @@ -9611,7 +9613,7 @@ llvm::Value *ValOffsetPtr = Builder.CreateGEP(Int64Ty, ValPtr, Builder.getInt32(i)); Address Addr = - Address::deprecated(ValOffsetPtr, CharUnits::fromQuantity(8)); + Address(ValOffsetPtr, Int64Ty, CharUnits::fromQuantity(8)); Args.push_back(Builder.CreateLoad(Addr)); }