From: Eli Friedman Date: Sun, 27 Dec 2009 07:02:50 +0000 (+0000) Subject: Add a sanity assertion so that we don't silently generate bad code; I'll file X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8f5d7404da36f689b0005fc0fb5bba398c3919a9;p=clang 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92175 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/CGCXX.cpp b/lib/CodeGen/CGCXX.cpp index 81dd534ba6..cc006d9dd6 100644 --- a/lib/CodeGen/CGCXX.cpp +++ b/lib/CodeGen/CGCXX.cpp @@ -1108,6 +1108,8 @@ void CodeGenFunction::InitializeVtablePtrsRecursive( } // 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);