Skip to content

Commit def9550

Browse files
authored
[Hashing] Remove Clang<=11 -fno-pic workaround (#110952)
If the LLVM build and an API user have different `(!defined(__clang__) || __clang_major__ > 11)` values, we will have a non-benign ODR violation and some users prefer a clear error to silent breakage. The Clang<=11 -fno-pic x86-64 workaround is likely not useful anyway because builds are mostly PIC (`POSITION_INDEPENDENT_CODE` or LLVM_ENABLE_PIC).
1 parent 848b20d commit def9550

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

llvm/include/llvm/ADT/Hashing.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -311,10 +311,7 @@ struct hash_state {
311311
/// depend on the particular hash values. On platforms without ASLR, this is
312312
/// still likely non-deterministic per build.
313313
inline uint64_t get_execution_seed() {
314-
// Work around x86-64 negative offset folding for old Clang -fno-pic
315-
// https://reviews.llvm.org/D93931
316-
#if LLVM_ENABLE_ABI_BREAKING_CHECKS && \
317-
(!defined(__clang__) || __clang_major__ > 11)
314+
#if LLVM_ENABLE_ABI_BREAKING_CHECKS
318315
return static_cast<uint64_t>(
319316
reinterpret_cast<uintptr_t>(&install_fatal_error_handler));
320317
#else

0 commit comments

Comments
 (0)