[vmkit-commits] [vmkit] r77997 - /vmkit/trunk/lib/JnJVM/Compiler/LowerConstantCalls.cpp
Nicolas Geoffray
nicolas.geoffray at lip6.fr
Mon Aug 3 14:18:35 PDT 2009
Author: geoffray
Date: Mon Aug 3 16:18:27 2009
New Revision: 77997
URL: http://llvm.org/viewvc/llvm-project?rev=77997&view=rev
Log:
Move to new llvm API.
Modified:
vmkit/trunk/lib/JnJVM/Compiler/LowerConstantCalls.cpp
Modified: vmkit/trunk/lib/JnJVM/Compiler/LowerConstantCalls.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/Compiler/LowerConstantCalls.cpp?rev=77997&r1=77996&r2=77997&view=diff
==============================================================================
--- vmkit/trunk/lib/JnJVM/Compiler/LowerConstantCalls.cpp (original)
+++ vmkit/trunk/lib/JnJVM/Compiler/LowerConstantCalls.cpp Mon Aug 3 16:18:27 2009
@@ -134,7 +134,7 @@
Value* Arg = Cmp->getOperand(0);
if (isVirtual(meth->access) && Arg == F.arg_begin()) {
Changed = true;
- Cmp->replaceAllUsesWith(Context->getFalse());
+ Cmp->replaceAllUsesWith(ConstantInt::getFalse(*Context));
Cmp->eraseFromParent();
break;
}
@@ -143,7 +143,7 @@
Instruction* CI = Ca.getInstruction();
if (CI && Ca.getCalledValue() == module->JavaObjectAllocateFunction) {
Changed = true;
- Cmp->replaceAllUsesWith(Context->getFalse());
+ Cmp->replaceAllUsesWith(ConstantInt::getFalse(*Context));
Cmp->eraseFromParent();
break;
}
@@ -474,13 +474,13 @@
} else if (V == module->GetArrayClassFunction) {
const llvm::Type* Ty =
PointerType::getUnqual(module->JavaCommonClassType);
- Constant* nullValue = Context->getNullValue(Ty);
+ Constant* nullValue = Constant::getNullValue(Ty);
// Check if we have already proceed this call.
if (Call.getArgument(1) == nullValue) {
BasicBlock* NBB = II->getParent()->splitBasicBlock(II);
I->getParent()->getTerminator()->eraseFromParent();
- Constant* init = Context->getNullValue(module->JavaClassArrayType);
+ Constant* init = Constant::getNullValue(module->JavaClassArrayType);
GlobalVariable* GV =
new GlobalVariable(*(F.getParent()), module->JavaClassArrayType,
false, GlobalValue::ExternalLinkage,
@@ -552,7 +552,7 @@
Value* res = new ICmpInst(CI, ICmpInst::ICMP_EQ, CurVT, VT2, "");
- node->addIncoming(Context->getTrue(), CI->getParent());
+ node->addIncoming(ConstantInt::getTrue(*Context), CI->getParent());
BranchInst::Create(CurEndBlock, FailedBlock, res, CI);
Value* Args[2] = { VT1, VT2 };
@@ -671,9 +671,9 @@
// Final block, that gets the result.
PHINode* node = PHINode::Create(Type::Int1Ty, "", BB9);
node->reserveOperandSpace(3);
- node->addIncoming(Context->getTrue(), CI->getParent());
- node->addIncoming(Context->getFalse(), BB7);
- node->addIncoming(Context->getTrue(), BB5);
+ node->addIncoming(ConstantInt::getTrue(*Context), CI->getParent());
+ node->addIncoming(ConstantInt::getFalse(*Context), BB7);
+ node->addIncoming(ConstantInt::getTrue(*Context), BB5);
// Don't forget to jump to the next block.
BranchInst::Create(EndBlock, BB9);
More information about the vmkit-commits
mailing list