Author: Simon Pilgrim Date: 2020-12-24T14:10:11Z New Revision: fb468953082c1fe97d42e6eabe8d3511bdb4054f
URL: https://github.com/llvm/llvm-project/commit/fb468953082c1fe97d42e6eabe8d3511bdb4054f DIFF: https://github.com/llvm/llvm-project/commit/fb468953082c1fe97d42e6eabe8d3511bdb4054f.diff LOG: [Support] Explicitly state that KnownBits::getMinValue/getMaxValue are UNSIGNED values. NFCI. Update the comment to make this clear, following the same approach as APInt. Added: Modified: llvm/include/llvm/Support/KnownBits.h Removed: ################################################################################ diff --git a/llvm/include/llvm/Support/KnownBits.h b/llvm/include/llvm/Support/KnownBits.h index f55839a35c13..2acaecfc3440 100644 --- a/llvm/include/llvm/Support/KnownBits.h +++ b/llvm/include/llvm/Support/KnownBits.h @@ -113,13 +113,13 @@ struct KnownBits { Zero.setSignBit(); } - /// Return the minimal value possible given these KnownBits. + /// Return the minimal unsigned value possible given these KnownBits. APInt getMinValue() const { // Assume that all bits that aren't known-ones are zeros. return One; } - /// Return the maximal value possible given these KnownBits. + /// Return the maximal unsigned value possible given these KnownBits. APInt getMaxValue() const { // Assume that all bits that aren't known-zeros are ones. return ~Zero; _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits