aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Lex/ModuleMap.cpp
diff options
context:
space:
mode:
authorNikita Popov <npopov@redhat.com>2023-11-09 10:23:10 +0100
committerGitHub <noreply@github.com>2023-11-09 10:23:10 +0100
commit74a76a288562c486f377121855ef7db0386e0e43 (patch)
tree45dc2f2bee067ddcf28b93f6d44b6470257d5c58 /clang/lib/Lex/ModuleMap.cpp
parentf6d525f8d8c8db8c509d4cc4441a567324c9e2fd (diff)
downloadllvm-74a76a288562c486f377121855ef7db0386e0e43.zip
llvm-74a76a288562c486f377121855ef7db0386e0e43.tar.gz
llvm-74a76a288562c486f377121855ef7db0386e0e43.tar.bz2
[BranchFolding] Remove dubious assert from operator< (#71639)
`MergePotentialElts::operator<` asserts that the two elements being compared are not equal. However, sorting functions are allowed to invoke the comparison function with equal arguments (though they usually don't for efficiency reasons). There is an existing special-case that disables the assert if _GLIBCXX_DEBUG is used, which may invoke the comparator with equal args to verify strict weak ordering. I believe libc++ also has strict weak ordering checks under some options nowadays. Recently, #71312 was reported, where a change to glibc's qsort_r implementation can also result in comparison between equal elements. From what I understood, this is an inefficiency that will be fixed on the glibc side as well, but I think at this point we should just remove this assertion. Fixes https://github.com/llvm/llvm-project/issues/71312.
Diffstat (limited to 'clang/lib/Lex/ModuleMap.cpp')
0 files changed, 0 insertions, 0 deletions