From f03d8f37c1753eda45530ed22adb1909c82dce7c Mon Sep 17 00:00:00 2001 From: Tomas Lindquist Olsen Date: Sun, 13 Jul 2008 21:41:45 +0200 Subject: [PATCH] [svn r370] Fixed landing pads on 64bit was broken (hardcoded 32bit type, should be size_t) --- ir/irlandingpad.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ir/irlandingpad.cpp b/ir/irlandingpad.cpp index e6cee10de2..281eef4194 100644 --- a/ir/irlandingpad.cpp +++ b/ir/irlandingpad.cpp @@ -161,7 +161,7 @@ void IRLandingPad::constructLandingPad(llvm::BasicBlock* inBB) 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);