summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGClass.cpp
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@mac.com>2010-03-29 02:38:51 +0000
committerAnders Carlsson <andersca@mac.com>2010-03-29 02:38:51 +0000
commit383f4cc8b9377db7456f7cf2bb2017feadd0a39a (patch)
treee94dc91220cf015781b471c00473ba001a066359 /clang/lib/CodeGen/CGClass.cpp
parent2d016af6234a6c5528c81dfbe123b9e4f5868e83 (diff)
downloadbcm5719-llvm-383f4cc8b9377db7456f7cf2bb2017feadd0a39a.tar.gz
bcm5719-llvm-383f4cc8b9377db7456f7cf2bb2017feadd0a39a.zip
Flip the switch to always get vtables from the VTT when necessary, I've verified that clang bootstraps with this.
llvm-svn: 99800
Diffstat (limited to 'clang/lib/CodeGen/CGClass.cpp')
-rw-r--r--clang/lib/CodeGen/CGClass.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/clang/lib/CodeGen/CGClass.cpp b/clang/lib/CodeGen/CGClass.cpp
index dfad33cc09f..ebefba24115 100644
--- a/clang/lib/CodeGen/CGClass.cpp
+++ b/clang/lib/CodeGen/CGClass.cpp
@@ -1565,12 +1565,9 @@ CodeGenFunction::InitializeVTablePointer(BaseSubobject Base,
// Compute the address point.
llvm::Value *VTableAddressPoint;
-
- // FIXME: Always use the new vtable code once we know it works.
- bool UseNewVTableCode = CGM.getLangOptions().DumpVtableLayouts;
-
+
// Check if we need to use a vtable from the VTT.
- if (UseNewVTableCode && CodeGenVTables::needsVTTParameter(CurGD) &&
+ if (CodeGenVTables::needsVTTParameter(CurGD) &&
(RD->getNumVBases() || BaseIsMorallyVirtual)) {
// Get the secondary vpointer index.
uint64_t VirtualPointerIndex =
@@ -1592,8 +1589,7 @@ CodeGenFunction::InitializeVTablePointer(BaseSubobject Base,
// Compute where to store the address point.
llvm::Value *VTableField;
- if (UseNewVTableCode &&
- CodeGenVTables::needsVTTParameter(CurGD) && BaseIsMorallyVirtual) {
+ if (CodeGenVTables::needsVTTParameter(CurGD) && BaseIsMorallyVirtual) {
// We need to use the virtual base offset offset because the virtual base
// might have a different offset in the most derived class.
VTableField = GetAddressOfBaseClass(LoadCXXThis(), VTableClass, RD,
OpenPOWER on IntegriCloud