summaryrefslogtreecommitdiff
path: root/docs/ProgrammersManual.html
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2007-03-01 21:05:33 +0000
committerReid Spencer <rspencer@reidspencer.com>2007-03-01 21:05:33 +0000
commit97b4ee34ed35b03cb3832d813292f7ceb516028f (patch)
treeb31cd0ef610752121d1eaef466600cbbeb31f382 /docs/ProgrammersManual.html
parenta0e0129e3f03fae1a275537a00e426a31d5eb649 (diff)
downloadllvm-97b4ee34ed35b03cb3832d813292f7ceb516028f.tar.gz
llvm-97b4ee34ed35b03cb3832d813292f7ceb516028f.tar.bz2
llvm-97b4ee34ed35b03cb3832d813292f7ceb516028f.tar.xz
Clarify the use of getValue/getSExtValue/getZExtValue and add the new
APInt constructor. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34811 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'docs/ProgrammersManual.html')
-rw-r--r--docs/ProgrammersManual.html18
1 files changed, 14 insertions, 4 deletions
diff --git a/docs/ProgrammersManual.html b/docs/ProgrammersManual.html
index df8f4abf47..031c86b911 100644
--- a/docs/ProgrammersManual.html
+++ b/docs/ProgrammersManual.html
@@ -2621,10 +2621,20 @@ a subclass, which represents the address of a global variable or function.
<li>ConstantInt : This subclass of Constant represents an integer constant of
any width.
<ul>
- <li><tt>int64_t getSExtValue() const</tt>: Returns the underlying value of
- this constant as a sign extended signed integer value.</li>
- <li><tt>uint64_t getZExtValue() const</tt>: Returns the underlying value
- of this constant as a zero extended unsigned integer value.</li>
+ <li><tt>const APInt&amp; getValue() const</tt>: Returns the underlying
+ value of this constant, an APInt value.</li>
+ <li><tt>int64_t getSExtValue() const</tt>: Converts the underlying APInt
+ value to an int64_t via sign extension. If the value (not the bit width)
+ of the APInt is too large to fit in an int64_t, an assertion will result.
+ For this reason, use of this method is discouraged.</li>
+ <li><tt>uint64_t getZExtValue() const</tt>: Converts the underlying APInt
+ value to a uint64_t via zero extension. IF the value (not the bit width)
+ of the APInt is too large to fit in a uint64_t, an assertion will result.
+ For this reason, use of this method is discourage.</li>
+ <li><tt>static ConstantInt* get(const APInt&amp; Val)</tt>: Returns the
+ ConstantInt object that represents the value provided by <tt>Val</tt>.
+ The type is implied as the IntegerType that corresponds to the bit width
+ of <tt>Val</tt>.</li>
<li><tt>static ConstantInt* get(const Type *Ty, uint64_t Val)</tt>:
Returns the ConstantInt object that represents the value provided by
<tt>Val</tt> for integer type <tt>Ty</tt>.</li>