Mercurial > projects > ldc
comparison ir/irlandingpad.cpp @ 1584:f4c56ed32238
Fixed issue in exception runtime with recent LLVM revisions, with this in place EH seems to work properly on x86-64. These fixes need to be merged into tango trunk still!
author | tomas@localhost.localdomain |
---|---|
date | Wed, 21 Oct 2009 05:46:56 +0200 |
parents | 8d086d552909 |
children | 40bd4a0d4870 |
comparison
equal
deleted
inserted
replaced
1583:593f99fddd2f | 1584:f4c56ed32238 |
---|---|
131 selectorargs.insert(selectorargs.begin(), it->catchType->ir.irStruct->getClassInfoSymbol()); | 131 selectorargs.insert(selectorargs.begin(), it->catchType->ir.irStruct->getClassInfoSymbol()); |
132 } | 132 } |
133 } | 133 } |
134 // if there's a finally, the eh table has to have a 0 action | 134 // if there's a finally, the eh table has to have a 0 action |
135 if(hasFinally) | 135 if(hasFinally) |
136 selectorargs.push_back(LLConstantInt::get(LLType::getInt32Ty(gIR->context()), 0)); | 136 selectorargs.push_back(DtoConstSize_t(0));//LLConstantInt::get(LLType::getInt32Ty(gIR->context()), 0)); |
137 | 137 |
138 // personality fn | 138 // personality fn |
139 llvm::Function* personality_fn = LLVM_D_GetRuntimeFunction(gIR->module, "_d_eh_personality"); | 139 llvm::Function* personality_fn = LLVM_D_GetRuntimeFunction(gIR->module, "_d_eh_personality"); |
140 LLValue* personality_fn_arg = gIR->ir->CreateBitCast(personality_fn, getPtrToType(LLType::getInt8Ty(gIR->context()))); | 140 LLValue* personality_fn_arg = gIR->ir->CreateBitCast(personality_fn, getPtrToType(LLType::getInt8Ty(gIR->context()))); |
141 selectorargs.insert(selectorargs.begin(), personality_fn_arg); | 141 selectorargs.insert(selectorargs.begin(), personality_fn_arg); |