summaryrefslogtreecommitdiff
path: root/docs/Stacker.html
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2006-10-20 07:07:24 +0000
committerReid Spencer <rspencer@reidspencer.com>2006-10-20 07:07:24 +0000
commitb83eb6447ba155342598f0fabe1f08f5baa9164a (patch)
treea5822f5fdac89033b7b16ba8e5aaf1ae10833b1c /docs/Stacker.html
parent6e7dd9db6bf677c9161a6ecc12f90651cf1231e0 (diff)
downloadllvm-b83eb6447ba155342598f0fabe1f08f5baa9164a.tar.gz
llvm-b83eb6447ba155342598f0fabe1f08f5baa9164a.tar.bz2
llvm-b83eb6447ba155342598f0fabe1f08f5baa9164a.tar.xz
For PR950:
This patch implements the first increment for the Signless Types feature. All changes pertain to removing the ConstantSInt and ConstantUInt classes in favor of just using ConstantInt. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31063 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'docs/Stacker.html')
-rw-r--r--docs/Stacker.html10
1 files changed, 5 insertions, 5 deletions
diff --git a/docs/Stacker.html b/docs/Stacker.html
index 7656dc10c0..a49b56de86 100644
--- a/docs/Stacker.html
+++ b/docs/Stacker.html
@@ -139,7 +139,7 @@ this: </p>
Value*
expression(BasicBlock* bb, Value* a, Value* b, Value* x, Value* y )
{
- ConstantSInt* one = ConstantSInt::get(Type::IntTy, 1);
+ ConstantInt* one = ConstantInt::get(Type::IntTy, 1);
BinaryOperator* or1 = BinaryOperator::createOr(a, b, "", bb);
BinaryOperator* add1 = BinaryOperator::createAdd(x, one, "", bb);
BinaryOperator* add2 = BinaryOperator::createAdd(y, one, "", bb);
@@ -308,7 +308,7 @@ things, this leads to the idiom:
</p>
<pre>
std::vector&lt;Value*&gt; index_vector;
-index_vector.push_back( ConstantSInt::get( Type::LongTy, 0 );
+index_vector.push_back( ConstantInt::get( Type::LongTy, 0 );
// ... push other indices ...
GetElementPtrInst* gep = new GetElementPtrInst( ptr, index_vector );
</pre>
@@ -367,9 +367,9 @@ functions in the LLVM IR that make things easier. Here's what I learned: </p>
<ul>
<li>Constants are Values like anything else and can be operands of instructions</li>
<li>Integer constants, frequently needed, can be created using the static "get"
- methods of the ConstantInt, ConstantSInt, and ConstantUInt classes. The nice thing
- about these is that you can "get" any kind of integer quickly.</li>
- <li>There's a special method on Constant class which allows you to get the null
+ methods of the ConstantInt class. The nice thing about these is that you can
+ "get" any kind of integer quickly.</li>
+ <li>There's a special method on Constant class which allows you to get the null
constant for <em>any</em> type. This is really handy for initializing large
arrays or structures, etc.</li>
</ul>