Mercurial > projects > ldc
comparison gen/tollvm.cpp @ 315:a9697749e898 trunk
[svn r336] Made sure calls within a landing pad area are invokes.
Nested trys still need some consideration.
author | ChristianK |
---|---|
date | Thu, 03 Jul 2008 22:05:45 +0200 |
parents | d59c363fccad |
children | 1a2777460bd5 |
comparison
equal
deleted
inserted
replaced
314:8d98e42ece93 | 315:a9697749e898 |
---|---|
408 if (global.params.is64bit) | 408 if (global.params.is64bit) |
409 fn = GET_INTRINSIC_DECL(memset_i64); | 409 fn = GET_INTRINSIC_DECL(memset_i64); |
410 else | 410 else |
411 fn = GET_INTRINSIC_DECL(memset_i32); | 411 fn = GET_INTRINSIC_DECL(memset_i32); |
412 | 412 |
413 gIR->ir->CreateCall4(fn, dst, DtoConstUbyte(0), nbytes, DtoConstUint(0), ""); | 413 gIR->CreateCallOrInvoke4(fn, dst, DtoConstUbyte(0), nbytes, DtoConstUint(0)); |
414 } | 414 } |
415 | 415 |
416 ////////////////////////////////////////////////////////////////////////////////////////// | 416 ////////////////////////////////////////////////////////////////////////////////////////// |
417 | 417 |
418 void DtoMemCpy(LLValue* dst, LLValue* src, LLValue* nbytes) | 418 void DtoMemCpy(LLValue* dst, LLValue* src, LLValue* nbytes) |
424 if (global.params.is64bit) | 424 if (global.params.is64bit) |
425 fn = GET_INTRINSIC_DECL(memcpy_i64); | 425 fn = GET_INTRINSIC_DECL(memcpy_i64); |
426 else | 426 else |
427 fn = GET_INTRINSIC_DECL(memcpy_i32); | 427 fn = GET_INTRINSIC_DECL(memcpy_i32); |
428 | 428 |
429 gIR->ir->CreateCall4(fn, dst, src, nbytes, DtoConstUint(0), ""); | 429 gIR->CreateCallOrInvoke4(fn, dst, src, nbytes, DtoConstUint(0)); |
430 } | 430 } |
431 | 431 |
432 ////////////////////////////////////////////////////////////////////////////////////////// | 432 ////////////////////////////////////////////////////////////////////////////////////////// |
433 | 433 |
434 void DtoAggrZeroInit(LLValue* v) | 434 void DtoAggrZeroInit(LLValue* v) |
457 llargs.push_back(DtoConstBool(ls)); | 457 llargs.push_back(DtoConstBool(ls)); |
458 llargs.push_back(DtoConstBool(sl)); | 458 llargs.push_back(DtoConstBool(sl)); |
459 llargs.push_back(DtoConstBool(ss)); | 459 llargs.push_back(DtoConstBool(ss)); |
460 llargs.push_back(DtoConstBool(device)); | 460 llargs.push_back(DtoConstBool(device)); |
461 | 461 |
462 llvm::CallInst::Create(fn, llargs.begin(), llargs.end(), "", gIR->scopebb()); | 462 gIR->CreateCallOrInvoke(fn, llargs.begin(), llargs.end()); |
463 } | 463 } |
464 | 464 |
465 ////////////////////////////////////////////////////////////////////////////////////////// | 465 ////////////////////////////////////////////////////////////////////////////////////////// |
466 | 466 |
467 llvm::ConstantInt* DtoConstSize_t(size_t i) | 467 llvm::ConstantInt* DtoConstSize_t(size_t i) |