[clang] Remove Address::deprecated() calls in CGVTables.cpp
authorArthur Eubanks <aeubanks@google.com>
Wed, 23 Feb 2022 00:54:09 +0000 (16:54 -0800)
committerArthur Eubanks <aeubanks@google.com>
Wed, 23 Feb 2022 00:54:28 +0000 (16:54 -0800)
clang/lib/CodeGen/CGVTables.cpp

index 34df7da..536db8d 100644 (file)
@@ -91,7 +91,10 @@ static RValue PerformReturnAdjustment(CodeGenFunction &CGF,
   auto ClassDecl = ResultType->getPointeeType()->getAsCXXRecordDecl();
   auto ClassAlign = CGF.CGM.getClassPointerAlignment(ClassDecl);
   ReturnValue = CGF.CGM.getCXXABI().performReturnAdjustment(
-      CGF, Address::deprecated(ReturnValue, ClassAlign), Thunk.Return);
+      CGF,
+      Address(ReturnValue, CGF.ConvertTypeForMem(ResultType->getPointeeType()),
+              ClassAlign),
+      Thunk.Return);
 
   if (NullCheckValue) {
     CGF.Builder.CreateBr(AdjustEnd);
@@ -198,7 +201,8 @@ CodeGenFunction::GenerateVarArgsThunk(llvm::Function *Fn,
   // Find the first store of "this", which will be to the alloca associated
   // with "this".
   Address ThisPtr =
-      Address::deprecated(&*AI, CGM.getClassPointerAlignment(MD->getParent()));
+      Address(&*AI, ConvertTypeForMem(MD->getThisType()->getPointeeType()),
+              CGM.getClassPointerAlignment(MD->getParent()));
   llvm::BasicBlock *EntryBB = &Fn->front();
   llvm::BasicBlock::iterator ThisStore =
       llvm::find_if(*EntryBB, [&](llvm::Instruction &I) {