[all-commits] [llvm/llvm-project] 55efb6: [MS] Mark vbase dtors used when marking dtor used

Reid Kleckner via All-commits all-commits at lists.llvm.org
Thu Apr 9 14:20:06 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 55efb68c19b4911f780ec4d074f8ff2f8529883f
      https://github.com/llvm/llvm-project/commit/55efb68c19b4911f780ec4d074f8ff2f8529883f
  Author: Reid Kleckner <rnk at google.com>
  Date:   2020-04-09 (Thu, 09 Apr 2020)

  Changed paths:
    M clang/include/clang/Sema/Sema.h
    M clang/lib/Sema/SemaDeclCXX.cpp
    M clang/lib/Sema/SemaExpr.cpp
    M clang/test/CXX/class.access/p4.cpp
    A clang/test/CodeGenCXX/microsoft-abi-vbase-dtor.cpp
    A clang/test/SemaCXX/ms-implicit-complete-dtor.cpp

  Log Message:
  -----------
  [MS] Mark vbase dtors used when marking dtor used

In the MS C++ ABI, the complete destructor variant for a class with
virtual bases is emitted whereever it is needed, instead of directly
alongside the base destructor variant. The complete destructor calls the
base destructor of the current class and the base destructors of each
virtual base. In order for this to work reliably, translation units that
use the destructor of a class also need to mark destructors of virtual
bases of that class used.

Fixes PR38521

Reviewed By: rsmith

Differential Revision: https://reviews.llvm.org/D77081




More information about the All-commits mailing list