diff ir/irlandingpad.cpp @ 1545:7fcb72d518f6

More factory methods moved to LLVMContext
author Benjamin Kramer <benny.kra@gmail.com>
date Wed, 15 Jul 2009 18:09:41 +0200
parents e1e93343fc11
children d6e8d5db259f
line wrap: on
line diff
--- a/ir/irlandingpad.cpp	Fri Jul 17 19:23:20 2009 +0200
+++ b/ir/irlandingpad.cpp	Wed Jul 15 18:09:41 2009 +0200
@@ -133,7 +133,7 @@
     }
     // if there's a finally, the eh table has to have a 0 action
     if(hasFinally)
-        selectorargs.push_back(llvm::ConstantInt::get(LLType::Int32Ty, 0));
+        selectorargs.push_back(gIR->context().getConstantInt(LLType::Int32Ty, 0));
 
     // personality fn
     llvm::Function* personality_fn = LLVM_D_GetRuntimeFunction(gIR->module, "_d_eh_personality");
@@ -186,7 +186,7 @@
             }
             // dubious comment
             // catches matched first get the largest switchval, so do size - unique int
-            llvm::ConstantInt* switchval = llvm::ConstantInt::get(DtoSize_t(), catchToInt[rit->catchType]);
+            llvm::ConstantInt* switchval = gIR->context().getConstantInt(DtoSize_t(), catchToInt[rit->catchType]);
             // and make sure we don't add the same switchval twice, may happen with nested trys
             if(!switchinst->findCaseValue(switchval))
                 switchinst->addCase(switchval, rit->target);