From 5a125b4040212c7955dc7f93080eae3bf1c7c4aa Mon Sep 17 00:00:00 2001 From: Eli Friedman Date: Fri, 30 Mar 2012 04:16:06 +0000 Subject: Missing piece of r153720: make sure the vtable pointer is handled correctly. llvm-svn: 153721 --- clang/lib/CodeGen/CGExprConstant.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'clang/lib/CodeGen/CGExprConstant.cpp') diff --git a/clang/lib/CodeGen/CGExprConstant.cpp b/clang/lib/CodeGen/CGExprConstant.cpp index 60cb4c5c23a..d528e0c4b72 100644 --- a/clang/lib/CodeGen/CGExprConstant.cpp +++ b/clang/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:: -- cgit v1.2.3