[all-commits] [llvm/llvm-project] ecdded: [Clang] Fix strict weak ordering in ItaniumVTableB...

Daniel Kutenin via All-commits all-commits at lists.llvm.org
Wed Aug 2 06:25:22 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ecdded5692f99626af338792a4191d39d2a2377e
      https://github.com/llvm/llvm-project/commit/ecdded5692f99626af338792a4191d39d2a2377e
  Author: Danila Kutenin <kutdanila at yandex.ru>
  Date:   2023-08-02 (Wed, 02 Aug 2023)

  Changed paths:
    M clang/lib/AST/VTableBuilder.cpp

  Log Message:
  -----------
  [Clang] Fix strict weak ordering in ItaniumVTableBuilder

In sorting elements can compare with themselves and sometimes assert
further down the line was triggered.

The changes are somewhat NFC, which explains the lack of test coverage.
libc++ has a debug mode that enables extra precondition checking. When
Clang is built with libc++ in that special mode, a few of Clang's tests
would fail with the libc++ assertion because Clang was not honoring the
preconditions for std::stable_sort. However, Clang would not hit the
precondition failure with any release mode STL, so the changes have no
impact on users beyond ones in this very special circumstance.

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




More information about the All-commits mailing list