[all-commits] [llvm/llvm-project] af954e: [WPD] Emit vcall_visibility metadata for Microsoft...

Teresa Johnson via All-commits all-commits at lists.llvm.org
Mon Jan 27 06:23:11 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: af954e441a5170a75687699d91d85e0692929d43
      https://github.com/llvm/llvm-project/commit/af954e441a5170a75687699d91d85e0692929d43
  Author: Teresa Johnson <tejohnson at google.com>
  Date:   2020-01-27 (Mon, 27 Jan 2020)

  Changed paths:
    M clang/lib/CodeGen/MicrosoftCXXABI.cpp
    M clang/test/CodeGenCXX/vcall-visibility-metadata.cpp

  Log Message:
  -----------
  [WPD] Emit vcall_visibility metadata for MicrosoftCXXABI

Summary:
The MicrosoftCXXABI uses a separate mechanism for emitting vtable
type metadata, and thus didn't pick up the change from D71907
to emit the vcall_visibility metadata under -fwhole-program-vtables.

I believe this is the cause of a Windows bot failure when I committed
follow on change D71913 that required a revert. The failure occurred
in a CFI test that was expecting to not abort because it expected a
devirtualization to occur, and without the necessary vcall_visibility
metadata we would not get devirtualization.

Note in the equivalent code in CodeGenModule::EmitVTableTypeMetadata
(used by the ItaniumCXXABI), we also emit the vcall_visibility metadata
when Virtual Function Elimination is enabled. Since I am not as familiar
with the details of that optimization, I have marked that as a TODO and
am only inserting under -fwhole-program-vtables.

Reviewers: evgeny777

Subscribers: Prazek, ostannard, cfe-commits

Tags: #clang

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




More information about the All-commits mailing list