From 3754f9656ab6a4648e5264d891ad5fb2f94f2a1a Mon Sep 17 00:00:00 2001 From: Eli Friedman Date: Fri, 30 Mar 2012 04:16:06 +0000 Subject: [PATCH] Missing piece of r153720: make sure the vtable pointer is handled correctly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153721 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/CGExprConstant.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/CodeGen/CGExprConstant.cpp b/lib/CodeGen/CGExprConstant.cpp index 60cb4c5c23..d528e0c4b7 100644 --- a/lib/CodeGen/CGExprConstant.cpp +++ b/lib/CodeGen/CGExprConstant.cpp @@ -102,7 +102,7 @@ void ConstStructBuilder::AppendVTablePointer(BaseSubobject Base, llvm::ConstantExpr::getInBoundsGetElementPtr(VTable, Indices); // Add the vtable at the start of the object. - AppendBytes(CharUnits::Zero(), VTableAddressPoint); + AppendBytes(Base.getBaseOffset(), VTableAddressPoint); } void ConstStructBuilder:: -- 2.40.0