aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2001-09-07 16:42:26 +0000
committerChris Lattner <sabre@nondot.org>2001-09-07 16:42:26 +0000
commit7365745546087f0998d5f40fe6966316ee1b725b (patch)
treeac1ede9283932a0b55a96ed34e99fc66ef015836 /lib
parent2f11a9ded395c8aded6300cbd12602d33e697259 (diff)
downloadexternal_llvm-7365745546087f0998d5f40fe6966316ee1b725b.zip
external_llvm-7365745546087f0998d5f40fe6966316ee1b725b.tar.gz
external_llvm-7365745546087f0998d5f40fe6966316ee1b725b.tar.bz2
Constants are now global unique objects
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@454 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Transforms/Scalar/InductionVars.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/lib/Transforms/Scalar/InductionVars.cpp b/lib/Transforms/Scalar/InductionVars.cpp
index 42397e0..b78eab8 100644
--- a/lib/Transforms/Scalar/InductionVars.cpp
+++ b/lib/Transforms/Scalar/InductionVars.cpp
@@ -191,8 +191,8 @@ static PHINode *InjectSimpleInductionVariable(cfg::Interval *Int) {
// Create the neccesary instructions...
PHINode *PN = new PHINode(Type::UIntTy, PHIName);
- ConstPoolVal *One = new ConstPoolUInt(Type::UIntTy, 1);
- ConstPoolVal *Zero = new ConstPoolUInt(Type::UIntTy, 0);
+ ConstPoolVal *One = ConstPoolUInt::get(Type::UIntTy, 1);
+ ConstPoolVal *Zero = ConstPoolUInt::get(Type::UIntTy, 0);
BinaryOperator *AddNode = BinaryOperator::create(Instruction::Add,
PN, One, AddName);
@@ -228,10 +228,6 @@ static PHINode *InjectSimpleInductionVariable(cfg::Interval *Int) {
BasicBlock::iterator I = IL.begin();
while ((*I)->isPHINode()) ++I;
IL.insert(I, AddNode);
-
- // Insert the constants into the constant pool for the method...
- M->getConstantPool().insert(One);
- M->getConstantPool().insert(Zero);
return PN;
}