diff options
| author | Alex Richardson <alexrichardson@google.com> | 2022-11-15 12:29:23 +0000 |
|---|---|---|
| committer | Alex Richardson <alexrichardson@google.com> | 2022-11-15 12:42:19 +0000 |
| commit | 00b1f7a6ab2aecd2309e2faebde18a11309c6181 (patch) | |
| tree | 8112ef2fec01d1d0e9edf282621a33ba3fe2e432 /llvm/lib/Bitcode/Reader/BitcodeReader.cpp | |
| parent | a5c9330b540fa2be776130ced016af3ec232270b (diff) | |
Use TI.hasBuiltinAtomic() when setting ATOMIC_*_LOCK_FREE values. NFCI
I noticed that the values for __{CLANG,GCC}_ATOMIC_POINTER_LOCK_FREE were
incorrectly set to 1 instead of two in downstream CHERI targets because
pointers are handled specially there. While fixing this downstream, I
noticed that the existing code could be refactored to use
TargetInfo::hasBuiltinAtomic instead of repeating the almost identical
logic. In theory there could be a difference here since hasBuiltinAtomic() also
returns true for types less than 1 char in size, but since
InitializePredefinedMacros() never passes such a value this change should
not introduce any functional changes.
Reviewed By: rprichard, efriedma
Differential Revision: https://reviews.llvm.org/D135142
Diffstat (limited to 'llvm/lib/Bitcode/Reader/BitcodeReader.cpp')
0 files changed, 0 insertions, 0 deletions
