diff ir/irlandingpad.cpp @ 349:d22d8d63c1fd trunk

[svn r370] Fixed landing pads on 64bit was broken (hardcoded 32bit type, should be size_t)
author lindquist
date Sun, 13 Jul 2008 21:41:45 +0200
parents d7e6ace5cca4
children d8357f7004ca
line wrap: on
line diff
--- a/ir/irlandingpad.cpp	Sun Jul 13 21:16:40 2008 +0200
+++ b/ir/irlandingpad.cpp	Sun Jul 13 21:41:45 2008 +0200
@@ -161,7 +161,7 @@
                 gIR->scope() = IRScope(switchinst->getDefaultDest(), gIR->scopeend());
             }
             // catches matched first get the largest switchval, so do size - unique int
-            llvm::ConstantInt* switchval = llvm::ConstantInt::get(LLType::Int32Ty, catchToInt.size() - catchToInt[it->catchType]);
+            llvm::ConstantInt* switchval = llvm::ConstantInt::get(DtoSize_t(), catchToInt.size() - catchToInt[it->catchType]);
             // and make sure we don't add the same switchval twice, may happen with nested trys
             if(!switchinst->findCaseValue(switchval))
                 switchinst->addCase(switchval, it->target);