LLVM API Documentation

Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

llvm::APSInt Class Reference

#include <APSInt.h>

Inheritance diagram for llvm::APSInt:

Inheritance graph
[legend]
Collaboration diagram for llvm::APSInt:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 APSInt ()
 Default constructor that creates an uninitialized APInt.
 APSInt (uint32_t BitWidth, bool isUnsigned=true)
 APSInt (const APInt &I, bool isUnsigned=true)
APSIntoperator= (const APSInt &RHS)
APSIntoperator= (const APInt &RHS)
APSIntoperator= (uint64_t RHS)
 Assignment operator.
bool isSigned () const
bool isUnsigned () const
void setIsUnsigned (bool Val)
void setIsSigned (bool Val)
void toString (SmallVectorImpl< char > &Str, unsigned Radix=10) const
 toString - Append this APSInt to the specified SmallString.
std::string toString (unsigned Radix) const
APSIntextend (uint32_t width)
APSIntextOrTrunc (uint32_t width)
const APSIntoperator%= (const APSInt &RHS)
const APSIntoperator/= (const APSInt &RHS)
APSInt operator% (const APSInt &RHS) const
APSInt operator/ (const APSInt &RHS) const
APSInt operator>> (unsigned Amt) const
APSIntoperator>>= (unsigned Amt)
bool operator< (const APSInt &RHS) const
bool operator> (const APSInt &RHS) const
bool operator<= (const APSInt &RHS) const
bool operator>= (const APSInt &RHS) const
APSInt operator<< (unsigned Bits) const
APSIntoperator<<= (unsigned Amt)
APSIntoperator++ ()
 Prefix increment operator.
APSIntoperator-- ()
 Prefix decrement operator.
APSInt operator++ (int)
APSInt operator-- (int)
 Postfix decrement operator.
APSInt operator- () const
 Unary negation operator.
APSIntoperator+= (const APSInt &RHS)
APSIntoperator-= (const APSInt &RHS)
APSIntoperator *= (const APSInt &RHS)
APSIntoperator &= (const APSInt &RHS)
APSIntoperator|= (const APSInt &RHS)
APSIntoperator^= (const APSInt &RHS)
APSInt operator & (const APSInt &RHS) const
APSInt And (const APSInt &RHS) const
APSInt operator| (const APSInt &RHS) const
APSInt Or (const APSInt &RHS) const
APSInt operator^ (const APSInt &RHS) const
APSInt Xor (const APSInt &RHS) const
APSInt operator * (const APSInt &RHS) const
APSInt operator+ (const APSInt &RHS) const
APSInt operator- (const APSInt &RHS) const
APSInt operator~ () const
 Unary bitwise complement operator.
void Profile (FoldingSetNodeID &ID) const
void toString (SmallVectorImpl< char > &Str, unsigned Radix, bool Signed) const
std::string toString (unsigned Radix, bool Signed) const

Constructor & Destructor Documentation

llvm::APSInt::APSInt  )  [inline, explicit]
 

Default constructor that creates an uninitialized APInt.

Definition at line 26 of file APSInt.h.

llvm::APSInt::APSInt uint32_t  BitWidth,
bool  isUnsigned = true
[inline, explicit]
 

APSInt ctor - Create an APSInt with the specified width, default to unsigned.

Definition at line 30 of file APSInt.h.

llvm::APSInt::APSInt const APInt I,
bool  isUnsigned = true
[inline, explicit]
 

Definition at line 33 of file APSInt.h.


Member Function Documentation

APSInt llvm::APSInt::And const APSInt RHS  )  const [inline]
 

Definition at line 200 of file APSInt.h.

References llvm::operator &().

APSInt& llvm::APSInt::extend uint32_t  width  )  [inline]
 

Definition at line 71 of file APSInt.h.

APSInt& llvm::APSInt::extOrTrunc uint32_t  width  )  [inline]
 

Definition at line 79 of file APSInt.h.

bool llvm::APSInt::isSigned  )  const [inline]
 

Definition at line 55 of file APSInt.h.

Referenced by llvm::operator<<().

bool llvm::APSInt::isUnsigned  )  const [inline]
 

Definition at line 56 of file APSInt.h.

APSInt llvm::APSInt::operator & const APSInt RHS  )  const [inline]
 

Definition at line 196 of file APSInt.h.

References IsUnsigned.

APSInt& llvm::APSInt::operator &= const APSInt RHS  )  [inline]
 

Definition at line 180 of file APSInt.h.

References IsUnsigned.

APSInt llvm::APSInt::operator * const APSInt RHS  )  const [inline]
 

Definition at line 221 of file APSInt.h.

References IsUnsigned.

APSInt& llvm::APSInt::operator *= const APSInt RHS  )  [inline]
 

Definition at line 175 of file APSInt.h.

References IsUnsigned.

APSInt llvm::APSInt::operator% const APSInt RHS  )  const [inline]
 

Definition at line 103 of file APSInt.h.

References IsUnsigned, llvm::APIntOps::srem(), and llvm::APIntOps::urem().

const APSInt& llvm::APSInt::operator%= const APSInt RHS  )  [inline]
 

Definition at line 87 of file APSInt.h.

References IsUnsigned, llvm::APIntOps::srem(), and llvm::APIntOps::urem().

APSInt llvm::APSInt::operator+ const APSInt RHS  )  const [inline]
 

Definition at line 225 of file APSInt.h.

References IsUnsigned.

APSInt llvm::APSInt::operator++ int   )  [inline]
 

Reimplemented from llvm::APInt.

Definition at line 156 of file APSInt.h.

APSInt& llvm::APSInt::operator++  )  [inline]
 

Prefix increment operator.

Returns:
*this incremented by one

Reimplemented from llvm::APInt.

Definition at line 148 of file APSInt.h.

APSInt& llvm::APSInt::operator+= const APSInt RHS  )  [inline]
 

Definition at line 165 of file APSInt.h.

References IsUnsigned.

APSInt llvm::APSInt::operator- const APSInt RHS  )  const [inline]
 

Definition at line 229 of file APSInt.h.

References IsUnsigned.

APSInt llvm::APSInt::operator-  )  const [inline]
 

Unary negation operator.

Negates *this using two's complement logic.

Returns:
An APInt value representing the negation of *this.

Reimplemented from llvm::APInt.

Definition at line 162 of file APSInt.h.

APSInt llvm::APSInt::operator-- int   )  [inline]
 

Postfix decrement operator.

Returns:
a new APInt representing *this decremented by one.

Reimplemented from llvm::APInt.

Definition at line 159 of file APSInt.h.

APSInt& llvm::APSInt::operator--  )  [inline]
 

Prefix decrement operator.

Returns:
*this decremented by one.

Reimplemented from llvm::APInt.

Definition at line 152 of file APSInt.h.

APSInt& llvm::APSInt::operator-= const APSInt RHS  )  [inline]
 

Definition at line 170 of file APSInt.h.

References IsUnsigned.

APSInt llvm::APSInt::operator/ const APSInt RHS  )  const [inline]
 

Definition at line 107 of file APSInt.h.

References IsUnsigned, llvm::APIntOps::sdiv(), and llvm::APIntOps::udiv().

const APSInt& llvm::APSInt::operator/= const APSInt RHS  )  [inline]
 

Definition at line 95 of file APSInt.h.

References IsUnsigned, llvm::APIntOps::sdiv(), and llvm::APIntOps::udiv().

bool llvm::APSInt::operator< const APSInt RHS  )  const [inline]
 

Definition at line 120 of file APSInt.h.

References IsUnsigned.

APSInt llvm::APSInt::operator<< unsigned  Bits  )  const [inline]
 

Reimplemented from llvm::APInt.

Definition at line 140 of file APSInt.h.

APSInt& llvm::APSInt::operator<<= unsigned  Amt  )  [inline]
 

Definition at line 143 of file APSInt.h.

bool llvm::APSInt::operator<= const APSInt RHS  )  const [inline]
 

Definition at line 128 of file APSInt.h.

References IsUnsigned.

APSInt& llvm::APSInt::operator= uint64_t  RHS  )  [inline]
 

Assignment operator.

The RHS value is assigned to *this. If the significant bits in RHS exceed the bit width, the excess bits are truncated. If the bit width is larger than 64, the value is zero filled in the unspecified high order bits.

Returns:
*this after assignment of RHS value.

Reimplemented from llvm::APInt.

Definition at line 48 of file APSInt.h.

APSInt& llvm::APSInt::operator= const APInt RHS  )  [inline]
 

Reimplemented from llvm::APInt.

Definition at line 42 of file APSInt.h.

APSInt& llvm::APSInt::operator= const APSInt RHS  )  [inline]
 

Definition at line 36 of file APSInt.h.

References IsUnsigned.

bool llvm::APSInt::operator> const APSInt RHS  )  const [inline]
 

Definition at line 124 of file APSInt.h.

References IsUnsigned.

bool llvm::APSInt::operator>= const APSInt RHS  )  const [inline]
 

Definition at line 132 of file APSInt.h.

References IsUnsigned.

APSInt llvm::APSInt::operator>> unsigned  Amt  )  const [inline]
 

Definition at line 112 of file APSInt.h.

References llvm::APIntOps::ashr(), and llvm::APIntOps::lshr().

APSInt& llvm::APSInt::operator>>= unsigned  Amt  )  [inline]
 

Definition at line 115 of file APSInt.h.

APSInt llvm::APSInt::operator^ const APSInt RHS  )  const [inline]
 

Definition at line 213 of file APSInt.h.

References IsUnsigned.

APSInt& llvm::APSInt::operator^= const APSInt RHS  )  [inline]
 

Definition at line 190 of file APSInt.h.

References IsUnsigned.

APSInt llvm::APSInt::operator| const APSInt RHS  )  const [inline]
 

Definition at line 204 of file APSInt.h.

References IsUnsigned.

APSInt& llvm::APSInt::operator|= const APSInt RHS  )  [inline]
 

Definition at line 185 of file APSInt.h.

References IsUnsigned.

APSInt llvm::APSInt::operator~  )  const [inline]
 

Unary bitwise complement operator.

Performs a bitwise complement operation on this APInt.

Returns:
an APInt that is the bitwise complement of *this

Reimplemented from llvm::APInt.

Definition at line 233 of file APSInt.h.

APSInt llvm::APSInt::Or const APSInt RHS  )  const [inline]
 

Definition at line 208 of file APSInt.h.

References llvm::operator|().

void APSInt::Profile FoldingSetNodeID ID  )  const
 

Profile - Used to insert APSInt objects, or objects that contain APSInt objects, into FoldingSets.

Reimplemented from llvm::APInt.

Definition at line 20 of file APSInt.cpp.

References llvm::FoldingSetNodeID::AddInteger(), and llvm::APInt::Profile().

void llvm::APSInt::setIsSigned bool  Val  )  [inline]
 

Definition at line 58 of file APSInt.h.

void llvm::APSInt::setIsUnsigned bool  Val  )  [inline]
 

Definition at line 57 of file APSInt.h.

std::string llvm::APInt::toString unsigned  Radix,
bool  Signed
const
 

toString - This returns the APInt as a std::string. Note that this is an inefficient method. It is better to pass in a SmallVector/SmallString to the methods above to avoid thrashing the heap for the string.

void llvm::APInt::toString SmallVectorImpl< char > &  Str,
unsigned  Radix,
bool  Signed
const
 

toString - Converts an APInt to a string and append it to Str. Str is commonly a SmallString.

std::string llvm::APSInt::toString unsigned  Radix  )  const [inline]
 

toString - Converts an APInt to a std::string. This is an inefficient method, your should prefer passing in a SmallString instead.

Definition at line 66 of file APSInt.h.

void llvm::APSInt::toString SmallVectorImpl< char > &  Str,
unsigned  Radix = 10
const [inline]
 

toString - Append this APSInt to the specified SmallString.

Definition at line 61 of file APSInt.h.

APSInt llvm::APSInt::Xor const APSInt RHS  )  const [inline]
 

Definition at line 217 of file APSInt.h.

References llvm::operator^().


The documentation for this class was generated from the following files:


This web site is hosted by the Computer Science Department at the University of Illinois at Urbana-Champaign.