Use the real base offset when calculating vbase offsets.
llvm-svn: 97338
diff --git a/clang/lib/CodeGen/CGVtable.cpp b/clang/lib/CodeGen/CGVtable.cpp
index 399b921..b7f8fe77 100644
--- a/clang/lib/CodeGen/CGVtable.cpp
+++ b/clang/lib/CodeGen/CGVtable.cpp
@@ -971,7 +971,7 @@
}
// FIXME: Don't use /8 here.
- int64_t OffsetToTop = -(int64_t)Base.getBaseOffset() / 8;
+ int64_t OffsetToTop = -(int64_t)RealBaseOffset / 8;
AddVBaseOffsets(Base.getBase(), OffsetToTop);
// We only want to add vcall offsets for virtual bases.