[all-commits] [llvm/llvm-project] 36606c: [NFC] Replace -1U{LL} expressions with appropriate...
PavelKopyl via All-commits
all-commits at lists.llvm.org
Tue Feb 14 13:16:59 PST 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 36606cf07080a44a1a9157f80112f9512bd6a3bf
https://github.com/llvm/llvm-project/commit/36606cf07080a44a1a9157f80112f9512bd6a3bf
Author: Pavel Kopyl <pavelkopyl at gmail.com>
Date: 2023-02-14 (Tue, 14 Feb 2023)
Changed paths:
M llvm/include/llvm/Support/BlockFrequency.h
M llvm/include/llvm/Support/LEB128.h
M llvm/lib/Support/APFloat.cpp
M llvm/lib/Support/APInt.cpp
Log Message:
-----------
[NFC] Replace -1U{LL} expressions with appropriate *_MAX macros in Support library.
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; -1ULL is replaced with UINT64_MAX.
Reviewed By: dblaikie, craig.topper
Differential Revision: https://reviews.llvm.org/D143942
More information about the All-commits
mailing list