[cfe-commits] r92175 - /cfe/trunk/lib/CodeGen/CGCXX.cpp

Eli Friedman eli.friedman at gmail.com
Sat Dec 26 23:02:50 PST 2009


Author: efriedma
Date: Sun Dec 27 01:02:50 2009
New Revision: 92175

URL: http://llvm.org/viewvc/llvm-project?rev=92175&view=rev
Log:
Add a sanity assertion so that we don't silently generate bad code; I'll file
a bug with a testcase hitting this assertion in a moment.


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

Modified: cfe/trunk/lib/CodeGen/CGCXX.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGCXX.cpp?rev=92175&r1=92174&r2=92175&view=diff

==============================================================================
--- cfe/trunk/lib/CodeGen/CGCXX.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGCXX.cpp Sun Dec 27 01:02:50 2009
@@ -1108,6 +1108,8 @@
   }
 
   // Compute the address point
+  assert(AddressPoints.count(std::make_pair(ClassDecl, Offset)) &&
+         "Missing address point for class");
   uint64_t AddressPoint = AddressPoints[std::make_pair(ClassDecl, Offset)];
   llvm::Value *VtableAddressPoint =
       Builder.CreateConstInBoundsGEP2_64(Vtable, 0, AddressPoint);





More information about the cfe-commits mailing list