[PATCH] D143942: [NFC] Replace -1U{LL} expressions with appropriate *_MAX macros in Support library.
Pavel Kopyl via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 13 12:40:58 PST 2023
pavelkopyl created this revision.
Herald added a subscriber: hiraditya.
Herald added a project: All.
pavelkopyl requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
This makes a code a bit more clear and also gets rid of C4146 warning
on MSVC compiler:
'unary minus operator applied to unsigned type, result still unsigned'.
In case uint64_t variable is initialized or compared against -1U
expression which corresponds to 32-bit constant, UINT_MAX macro
is used to preserve NFC semantics.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D143942
Files:
llvm/include/llvm/Support/BlockFrequency.h
llvm/include/llvm/Support/LEB128.h
llvm/lib/Support/APFloat.cpp
llvm/lib/Support/APInt.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D143942.497075.patch
Type: text/x-patch
Size: 3313 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230213/3eb60c6e/attachment.bin>
More information about the llvm-commits
mailing list