[PATCH] D26559: Insert a type check before reading vtable.
Peter Collingbourne via cfe-commits
cfe-commits at lists.llvm.org
Tue Nov 15 14:43:41 PST 2016
pcc added inline comments.
================
Comment at: lib/CodeGen/CGExprCXX.cpp:1928-1933
+ SourceLocation CallLoc;
+ if (E)
+ CallLoc = E->getExprLoc();
+ EmitTypeCheck(CodeGenFunction::TCK_MemberCall,
+ CallLoc, Ptr.getPointer(),
+ DeleteTy);
----------------
This could all be moved into EmitObjectDelete.
================
Comment at: lib/CodeGen/MicrosoftCXXABI.cpp:1820-1833
+ ASTContext &Context = getContext();
+ SourceLocation CallLoc = CE ? CE->getLocStart() : SourceLocation();
+ CGF.EmitTypeCheck(CodeGenFunction::TCK_MemberCall,
+ CallLoc, This.getPointer(),
+ Context.getRecordType(Dtor->getParent()));
+
// We have only one destructor in the vftable but can get both behaviors
----------------
If you undo this part do the tests still pass?
https://reviews.llvm.org/D26559
More information about the cfe-commits
mailing list