summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2012-03-30 04:16:06 +0000
committerEli Friedman <eli.friedman@gmail.com>2012-03-30 04:16:06 +0000
commit3754f9656ab6a4648e5264d891ad5fb2f94f2a1a (patch)
treeaa530b4354e0b17d92b82239d7c3cd216c92fcb1
parent5fe61c6cb09a5a2d2ecddfb74f8b253d9d462165 (diff)
downloadclang-3754f9656ab6a4648e5264d891ad5fb2f94f2a1a.tar.gz
clang-3754f9656ab6a4648e5264d891ad5fb2f94f2a1a.tar.bz2
clang-3754f9656ab6a4648e5264d891ad5fb2f94f2a1a.tar.xz
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
-rw-r--r--lib/CodeGen/CGExprConstant.cpp2
1 files changed, 1 insertions, 1 deletions
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::