From: Sven van Haastregt Date: Fri, 22 Jan 2021 09:23:41 +0000 (+0000) Subject: [APSInt][NFC] Clean up doxygen comments X-Git-Tag: llvmorg-13-init~506 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3e8d1e8b12ba9017b861fff94afdd4a29b39de17;p=platform%2Fupstream%2Fllvm.git [APSInt][NFC] Clean up doxygen comments Add a Doxygen class comment and clean up other Doxygen comments in this file while we're at it. --- diff --git a/llvm/include/llvm/ADT/APSInt.h b/llvm/include/llvm/ADT/APSInt.h index 0f99182..82e9ba8 100644 --- a/llvm/include/llvm/ADT/APSInt.h +++ b/llvm/include/llvm/ADT/APSInt.h @@ -18,6 +18,7 @@ namespace llvm { +/// An arbitrary precision integer that knows its signedness. class LLVM_NODISCARD APSInt : public APInt { bool IsUnsigned; @@ -25,8 +26,7 @@ public: /// Default constructor that creates an uninitialized APInt. explicit APSInt() : IsUnsigned(false) {} - /// APSInt ctor - Create an APSInt with the specified width, default to - /// unsigned. + /// Create an APSInt with the specified width, default to unsigned. explicit APSInt(uint32_t BitWidth, bool isUnsigned = true) : APInt(BitWidth, 0), IsUnsigned(isUnsigned) {} @@ -78,11 +78,11 @@ public: void setIsUnsigned(bool Val) { IsUnsigned = Val; } void setIsSigned(bool Val) { IsUnsigned = !Val; } - /// toString - Append this APSInt to the specified SmallString. + /// Append this APSInt to the specified SmallString. void toString(SmallVectorImpl &Str, unsigned Radix = 10) const { APInt::toString(Str, Radix, isSigned()); } - /// toString - Converts an APInt to a std::string. This is an inefficient + /// Converts an APInt to a std::string. This is an inefficient /// method; you should prefer passing in a SmallString instead. std::string toString(unsigned Radix) const { return APInt::toString(Radix, isSigned()); @@ -282,15 +282,15 @@ public: return APSInt(~static_cast(*this), IsUnsigned); } - /// getMaxValue - Return the APSInt representing the maximum integer value - /// with the given bit width and signedness. + /// Return the APSInt representing the maximum integer value with the given + /// bit width and signedness. static APSInt getMaxValue(uint32_t numBits, bool Unsigned) { return APSInt(Unsigned ? APInt::getMaxValue(numBits) : APInt::getSignedMaxValue(numBits), Unsigned); } - /// getMinValue - Return the APSInt representing the minimum integer value - /// with the given bit width and signedness. + /// Return the APSInt representing the minimum integer value with the given + /// bit width and signedness. static APSInt getMinValue(uint32_t numBits, bool Unsigned) { return APSInt(Unsigned ? APInt::getMinValue(numBits) : APInt::getSignedMinValue(numBits), Unsigned); @@ -331,8 +331,8 @@ public: static APSInt get(int64_t X) { return APSInt(APInt(64, X), false); } static APSInt getUnsigned(uint64_t X) { return APSInt(APInt(64, X), true); } - /// Profile - Used to insert APSInt objects, or objects that contain APSInt - /// objects, into FoldingSets. + /// Used to insert APSInt objects, or objects that contain APSInt objects, + /// into FoldingSets. void Profile(FoldingSetNodeID& ID) const; };