[cfe-commits] r153721 - /cfe/trunk/lib/CodeGen/CGExprConstant.cpp

Eli Friedman eli.friedman at gmail.com
Thu Mar 29 21:16:06 PDT 2012


Author: efriedma
Date: Thu Mar 29 23:16:06 2012
New Revision: 153721

URL: http://llvm.org/viewvc/llvm-project?rev=153721&view=rev
Log:
Missing piece of r153720: make sure the vtable pointer is handled correctly.


Modified:
    cfe/trunk/lib/CodeGen/CGExprConstant.cpp

Modified: cfe/trunk/lib/CodeGen/CGExprConstant.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGExprConstant.cpp?rev=153721&r1=153720&r2=153721&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGExprConstant.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGExprConstant.cpp Thu Mar 29 23:16:06 2012
@@ -102,7 +102,7 @@
     llvm::ConstantExpr::getInBoundsGetElementPtr(VTable, Indices);
 
   // Add the vtable at the start of the object.
-  AppendBytes(CharUnits::Zero(), VTableAddressPoint);
+  AppendBytes(Base.getBaseOffset(), VTableAddressPoint);
 }
 
 void ConstStructBuilder::





More information about the cfe-commits mailing list