[vmkit-commits] [vmkit] r76545 - /vmkit/trunk/lib/JnJVM/Compiler/LowerConstantCalls.cpp

Nicolas Geoffray nicolas.geoffray at lip6.fr
Tue Jul 21 00:47:08 PDT 2009


Author: geoffray
Date: Tue Jul 21 02:47:07 2009
New Revision: 76545

URL: http://llvm.org/viewvc/llvm-project?rev=76545&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=76545&r1=76544&r2=76545&view=diff

==============================================================================
--- vmkit/trunk/lib/JnJVM/Compiler/LowerConstantCalls.cpp (original)
+++ vmkit/trunk/lib/JnJVM/Compiler/LowerConstantCalls.cpp Tue Jul 21 02:47:07 2009
@@ -132,7 +132,7 @@
           Value* Arg = Cmp->getOperand(0);
           if (isVirtual(meth->access) && Arg == F.arg_begin()) {
             Changed = true;
-            Cmp->replaceAllUsesWith(ConstantInt::getFalse());
+            Cmp->replaceAllUsesWith(Context->getConstantIntFalse());
             Cmp->eraseFromParent();
             break;
           }
@@ -141,7 +141,7 @@
           Instruction* CI = Ca.getInstruction();
           if (CI && Ca.getCalledValue() == module->JavaObjectAllocateFunction) {
             Changed = true;
-            Cmp->replaceAllUsesWith(ConstantInt::getFalse());
+            Cmp->replaceAllUsesWith(Context->getConstantIntFalse());
             Cmp->eraseFromParent();
             break;
           }
@@ -551,7 +551,7 @@
              
           Value* res = new ICmpInst(CI, ICmpInst::ICMP_EQ, CurVT, VT2, "");
 
-          node->addIncoming(ConstantInt::getTrue(), CI->getParent());
+          node->addIncoming(Context->getConstantIntTrue(), CI->getParent());
           BranchInst::Create(CurEndBlock, FailedBlock, res, CI);
 
           Value* Args[2] = { VT1, VT2 };
@@ -670,9 +670,9 @@
           // Final block, that gets the result.
           PHINode* node = PHINode::Create(Type::Int1Ty, "", BB9);
           node->reserveOperandSpace(3);
-          node->addIncoming(ConstantInt::getTrue(), CI->getParent());
-          node->addIncoming(ConstantInt::getFalse(), BB7);
-          node->addIncoming(ConstantInt::getTrue(), BB5);
+          node->addIncoming(Context->getConstantIntTrue(), CI->getParent());
+          node->addIncoming(Context->getConstantIntFalse(), BB7);
+          node->addIncoming(Context->getConstantIntTrue(), BB5);
     
           // Don't forget to jump to the next block.
           BranchInst::Create(EndBlock, BB9);





More information about the vmkit-commits mailing list