[all-commits] [llvm/llvm-project] 1d0bd8: [MSABI] Remove comdat attribute for inheriting ctor.

jyu2-git via All-commits all-commits at lists.llvm.org
Mon Aug 28 15:28:32 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 1d0bd8e51be2627f79bede54735c38b917ea04ee
      https://github.com/llvm/llvm-project/commit/1d0bd8e51be2627f79bede54735c38b917ea04ee
  Author: Jennifer Yu <jennifer.yu at intel.com>
  Date:   2023-08-28 (Mon, 28 Aug 2023)

  Changed paths:
    M clang/lib/AST/ASTContext.cpp
    M clang/lib/CodeGen/CodeGenModule.cpp
    A clang/test/CodeGenCXX/ms-inheriting-ctor.cpp

  Log Message:
  -----------
  [MSABI] Remove comdat attribute for inheriting ctor.

Currently, for MS, the linkage for the inheriting constructors is set to
internal.  However, the comdat attribute is also set like:

define internal noundef ptr @"??0?$B at _N@@qeaa at AEBVF@@aebua@@@z"(ptr noundef nonnull returned align 1 dereferenceable(1) %this, ptr noundef nonnull align 1 dereferenceable(1) %0, ptr noundef nonnull align 1 dereferenceable(1) %1) unnamed_addr comdat

This could cause linker to fail.

The change is to remove comdat attribute for the inheriting constructor
to make linker happy.

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




More information about the All-commits mailing list