Make emitting a VTT a two-step process, much like emitting a VTable. You first get the address of the VTT, and then pass it to EmitVTTDefinition.

llvm-svn: 124539
This commit is contained in:
Anders Carlsson
2011-01-29 19:16:51 +00:00
parent 93be9a90cc
commit 883fc72c3c
6 changed files with 49 additions and 54 deletions

View File

@@ -318,7 +318,7 @@ static llvm::Value *GetVTTParameter(CodeGenFunction &CGF, GlobalDecl GD,
VTT = CGF.Builder.CreateConstInBoundsGEP1_64(VTT, SubVTTIndex);
} else {
// We're the complete constructor, so get the VTT by name.
VTT = CGF.CGM.getVTables().getVTT(RD);
VTT = CGF.CGM.getVTables().GetAddrOfVTT(RD);
VTT = CGF.Builder.CreateConstInBoundsGEP2_64(VTT, 0, SubVTTIndex);
}