From: Timur Iskhodzhanov Date: Sun, 27 Oct 2013 17:10:27 +0000 (+0000) Subject: Fix the inconsistent order of parameters in the GetVBaseOffsetFromVBPtr definition... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0e4f5598fedc333a05c0611fe3ad46266f5e1b5f;p=clang Fix the inconsistent order of parameters in the GetVBaseOffsetFromVBPtr definition and declaration git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193505 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/MicrosoftCXXABI.cpp b/lib/CodeGen/MicrosoftCXXABI.cpp index 48bf6844f7..02f080996c 100644 --- a/lib/CodeGen/MicrosoftCXXABI.cpp +++ b/lib/CodeGen/MicrosoftCXXABI.cpp @@ -412,7 +412,7 @@ MicrosoftCXXABI::GetVirtualBaseClassOffset(CodeGenFunction &CGF, llvm::ConstantInt::get(CGM.IntTy, VBTableChars.getQuantity()); llvm::Value *VBPtrToNewBase = - GetVBaseOffsetFromVBPtr(CGF, This, VBTableOffset, VBPtrOffset); + GetVBaseOffsetFromVBPtr(CGF, This, VBPtrOffset, VBTableOffset); VBPtrToNewBase = CGF.Builder.CreateSExtOrBitCast(VBPtrToNewBase, CGM.PtrDiffTy); return CGF.Builder.CreateNSWAdd(VBPtrOffset, VBPtrToNewBase); @@ -1436,8 +1436,8 @@ bool MicrosoftCXXABI::MemberPointerConstantIsNull(const MemberPointerType *MPT, llvm::Value * MicrosoftCXXABI::GetVBaseOffsetFromVBPtr(CodeGenFunction &CGF, llvm::Value *This, - llvm::Value *VBTableOffset, llvm::Value *VBPtrOffset, + llvm::Value *VBTableOffset, llvm::Value **VBPtrOut) { CGBuilderTy &Builder = CGF.Builder; // Load the vbtable pointer from the vbptr in the instance. @@ -1493,7 +1493,7 @@ MicrosoftCXXABI::AdjustVirtualBase(CodeGenFunction &CGF, } llvm::Value *VBPtr = 0; llvm::Value *VBaseOffs = - GetVBaseOffsetFromVBPtr(CGF, Base, VBTableOffset, VBPtrOffset, &VBPtr); + GetVBaseOffsetFromVBPtr(CGF, Base, VBPtrOffset, VBTableOffset, &VBPtr); llvm::Value *AdjustedBase = Builder.CreateInBoundsGEP(VBPtr, VBaseOffs); // Merge control flow with the case where we didn't have to adjust.