aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Transforms/Utils
diff options
context:
space:
mode:
authorGabor Greif <ggreif@gmail.com>2008-05-16 19:29:10 +0000
committerGabor Greif <ggreif@gmail.com>2008-05-16 19:29:10 +0000
commit7cbd8a3e92221437048b484d5ef9c0a22d0f8c58 (patch)
tree9c9985d8a294246ec942188ae322e6ce4b5d4efe /lib/Transforms/Utils
parent446efddfcd655131bd0ceeacce9c1166e30ed479 (diff)
downloadexternal_llvm-7cbd8a3e92221437048b484d5ef9c0a22d0f8c58.tar.gz
external_llvm-7cbd8a3e92221437048b484d5ef9c0a22d0f8c58.tar.bz2
external_llvm-7cbd8a3e92221437048b484d5ef9c0a22d0f8c58.zip
API change for {BinaryOperator|CmpInst|CastInst}::create*() --> Create. Legacy interfaces will be in place for some time. (Merge from use-diet branch.)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51200 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Utils')
-rw-r--r--lib/Transforms/Utils/LowerAllocations.cpp4
-rw-r--r--lib/Transforms/Utils/LowerSwitch.cpp2
-rw-r--r--lib/Transforms/Utils/SimplifyCFG.cpp10
3 files changed, 8 insertions, 8 deletions
diff --git a/lib/Transforms/Utils/LowerAllocations.cpp b/lib/Transforms/Utils/LowerAllocations.cpp
index f65a716711..4223c7f481 100644
--- a/lib/Transforms/Utils/LowerAllocations.cpp
+++ b/lib/Transforms/Utils/LowerAllocations.cpp
@@ -131,11 +131,11 @@ bool LowerAllocations::runOnBasicBlock(BasicBlock &BB) {
} else {
Value *Scale = MI->getOperand(0);
if (Scale->getType() != IntPtrTy)
- Scale = CastInst::createIntegerCast(Scale, IntPtrTy, false /*ZExt*/,
+ Scale = CastInst::CreateIntegerCast(Scale, IntPtrTy, false /*ZExt*/,
"", I);
// Multiply it by the array size if necessary...
- MallocArg = BinaryOperator::create(Instruction::Mul, Scale,
+ MallocArg = BinaryOperator::Create(Instruction::Mul, Scale,
MallocArg, "", I);
}
}
diff --git a/lib/Transforms/Utils/LowerSwitch.cpp b/lib/Transforms/Utils/LowerSwitch.cpp
index c24847858c..630f97cd6d 100644
--- a/lib/Transforms/Utils/LowerSwitch.cpp
+++ b/lib/Transforms/Utils/LowerSwitch.cpp
@@ -202,7 +202,7 @@ BasicBlock* LowerSwitch::newLeafBlock(CaseRange& Leaf, Value* Val,
} else {
// Emit V-Lo <=u Hi-Lo
Constant* NegLo = ConstantExpr::getNeg(Leaf.Low);
- Instruction* Add = BinaryOperator::createAdd(Val, NegLo,
+ Instruction* Add = BinaryOperator::CreateAdd(Val, NegLo,
Val->getName()+".off",
NewLeaf);
Constant *UpperBound = ConstantExpr::getAdd(NegLo, Leaf.High);
diff --git a/lib/Transforms/Utils/SimplifyCFG.cpp b/lib/Transforms/Utils/SimplifyCFG.cpp
index 7396bb440e..45d3d4e144 100644
--- a/lib/Transforms/Utils/SimplifyCFG.cpp
+++ b/lib/Transforms/Utils/SimplifyCFG.cpp
@@ -1513,7 +1513,7 @@ bool llvm::SimplifyCFG(BasicBlock *BB) {
// Invert the predecessors condition test (xor it with true),
// which allows us to write this code once.
Value *NewCond =
- BinaryOperator::createNot(PBI->getCondition(),
+ BinaryOperator::CreateNot(PBI->getCondition(),
PBI->getCondition()->getName()+".not", PBI);
PBI->setCondition(NewCond);
BasicBlock *OldTrue = PBI->getSuccessor(0);
@@ -1534,7 +1534,7 @@ bool llvm::SimplifyCFG(BasicBlock *BB) {
PBI->getSuccessor(0) == TrueDest ?
Instruction::Or : Instruction::And;
Value *NewCond =
- BinaryOperator::create(Opcode, PBI->getCondition(),
+ BinaryOperator::Create(Opcode, PBI->getCondition(),
New, "bothcond", PBI);
PBI->setCondition(NewCond);
if (PBI->getSuccessor(0) == BB) {
@@ -1656,17 +1656,17 @@ bool llvm::SimplifyCFG(BasicBlock *BB) {
// Make sure we get to CommonDest on True&True directions.
Value *PBICond = PBI->getCondition();
if (PBIOp)
- PBICond = BinaryOperator::createNot(PBICond,
+ PBICond = BinaryOperator::CreateNot(PBICond,
PBICond->getName()+".not",
PBI);
Value *BICond = BI->getCondition();
if (BIOp)
- BICond = BinaryOperator::createNot(BICond,
+ BICond = BinaryOperator::CreateNot(BICond,
BICond->getName()+".not",
PBI);
// Merge the conditions.
Value *Cond =
- BinaryOperator::createOr(PBICond, BICond, "brmerge", PBI);
+ BinaryOperator::CreateOr(PBICond, BICond, "brmerge", PBI);
// Modify PBI to branch on the new condition to the new dests.
PBI->setCondition(Cond);