r218506 - MS ABI: Assert that vftables should have a non-RTTI entry
David Majnemer
david.majnemer at gmail.com
Fri Sep 26 01:07:55 PDT 2014
Author: majnemer
Date: Fri Sep 26 03:07:55 2014
New Revision: 218506
URL: http://llvm.org/viewvc/llvm-project?rev=218506&view=rev
Log:
MS ABI: Assert that vftables should have a non-RTTI entry
No functional change intended.
Modified:
cfe/trunk/lib/AST/VTableBuilder.cpp
Modified: cfe/trunk/lib/AST/VTableBuilder.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/VTableBuilder.cpp?rev=218506&r1=218505&r2=218506&view=diff
==============================================================================
--- cfe/trunk/lib/AST/VTableBuilder.cpp (original)
+++ cfe/trunk/lib/AST/VTableBuilder.cpp Fri Sep 26 03:07:55 2014
@@ -2546,7 +2546,8 @@ private:
BasesSetVectorTy VisitedBases;
AddMethods(BaseSubobject(MostDerivedClass, CharUnits::Zero()), 0, nullptr,
VisitedBases);
- assert(Components.size() && "vftable can't be empty");
+ assert((HasRTTIComponent ? Components.size() - 1 : Components.size()) &&
+ "vftable can't be empty");
assert(MethodVFTableLocations.empty());
for (MethodInfoMapTy::const_iterator I = MethodInfoMap.begin(),
More information about the cfe-commits
mailing list