[all-commits] [llvm/llvm-project] 055ee2: [ORC] Drop Comdat when discarding IR symbol

Jonas Hahnfeld via All-commits all-commits at lists.llvm.org
Mon Feb 6 11:58:34 PST 2023

  Branch: refs/heads/release/16.x
  Home:   https://github.com/llvm/llvm-project
  Commit: 055ee2257ff2c3a9f06a25d0acc2951d0b7e2d1f
  Author: Jonas Hahnfeld <jonas.hahnfeld at cern.ch>
  Date:   2023-02-06 (Mon, 06 Feb 2023)

  Changed paths:
    M llvm/lib/ExecutionEngine/Orc/Layer.cpp
    A llvm/test/ExecutionEngine/Orc/Inputs/weak-comdat-def.ll
    A llvm/test/ExecutionEngine/Orc/weak-comdat.ll

  Log Message:
  [ORC] Drop Comdat when discarding IR symbol

According to the IR verifier, "Declaration[s] may not be in a Comdat!"

This is a re-commit of 76b3f0b4d5a0b8c54147c4c73a30892bbca76467 and
87d7838202267a011639fcbf97263556ccf091dc with updates to the test:
 * Force emission of the extra-module, to trigger the bug after D138264,
   by providing a second symbol @g, and making the comdat nodeduplicate.
   (Technically only one is needed, but two should be safer.)
 * Name the comdat $f to avoid failure on Windows:
   LLVM ERROR: Associative COMDAT symbol 'c' does not exist.
 * Mark the test as UNSUPPORTED on macOS, MachO doesn't support COMDATs.

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

(cherry picked from commit 50ca8b3e8726180a74fcbc4611893f19189b97c0)

More information about the All-commits mailing list