[PATCH] Get rid of VTableContext::ComputeMethodVTableIndices() and VTableContext::getNumVirtualFunctionPointers()

Timur Iskhodzhanov timurrrr at google.com
Mon May 13 09:25:24 PDT 2013


  Reid,
  I think I've mostly addressed your comments, please see the new revision.

  Richard,
  Can you please comment on the virtual implicit dtors questions in this and what Reid has asked on the previous revision?


================
Comment at: lib/AST/VTableBuilder.cpp:1592
@@ +1591,3 @@
+        ++NextMI;
+        assert(NextMI == E && "The implicit virtual destructor "
+               "should be the last method in a class");
----------------
I'm not 100% about this one, so please check my reasoning below.

a) the VTableBuilder code has always assumed that the implicit virtual dtor is at the end of the RD->method_* list, but the assert just wasn't there.
b) I //think// the implicit virtual dtor, if present, should always be at the end of the methods list, as one can only tell there is no explicit dtor after he/she has finished reading the whole record definition.


http://llvm-reviews.chandlerc.com/D785



More information about the cfe-commits mailing list