updated on Tue Jan 10 08:08:34 UTC 2012
[aur-mirror.git] / ldc-tango / ldc.patch
blob27ab1f3dcbfbd2b05733d2ebc41552fe8464d5a8
1 diff -r d268bf419a09 gen/tollvm.cpp
2 --- a/gen/tollvm.cpp Sat Nov 22 21:11:26 2008 +0100
3 +++ b/gen/tollvm.cpp Sun Nov 23 14:21:32 2008 +0100
4 @@ -409,11 +409,9 @@ void DtoMemSetZero(LLValue* dst, LLValue
6 dst = DtoBitCast(dst,getVoidPtrType());
8 - llvm::Function* fn;
9 - if (global.params.is64bit)
10 - fn = GET_INTRINSIC_DECL(memset_i64);
11 - else
12 - fn = GET_INTRINSIC_DECL(memset_i32);
13 + const LLType* intTy = DtoSize_t();
14 + llvm::Function* fn = llvm::Intrinsic::getDeclaration(gIR->module,
15 + llvm::Intrinsic::memset, &intTy, 1);
17 gIR->ir->CreateCall4(fn, dst, DtoConstUbyte(0), nbytes, DtoConstUint(0), "");
19 @@ -425,11 +423,9 @@ void DtoMemCpy(LLValue* dst, LLValue* sr
20 dst = DtoBitCast(dst,getVoidPtrType());
21 src = DtoBitCast(src,getVoidPtrType());
23 - llvm::Function* fn;
24 - if (global.params.is64bit)
25 - fn = GET_INTRINSIC_DECL(memcpy_i64);
26 - else
27 - fn = GET_INTRINSIC_DECL(memcpy_i32);
28 + const LLType* intTy = DtoSize_t();
29 + llvm::Function* fn = llvm::Intrinsic::getDeclaration(gIR->module,
30 + llvm::Intrinsic::memcpy, &intTy, 1);
32 gIR->ir->CreateCall4(fn, dst, src, nbytes, DtoConstUint(0), "");
34 diff -r d268bf419a09 gen/toobj.cpp
35 --- a/gen/toobj.cpp Sat Nov 22 21:11:26 2008 +0100
36 +++ b/gen/toobj.cpp Sun Nov 23 14:21:32 2008 +0100
37 @@ -262,7 +262,7 @@ void Module::genobjfile(int multiobj, ch
38 Logger::println("Writing native asm to: %s\n", spath.c_str());
39 std::string err;
41 - llvm::raw_fd_ostream out(spath.c_str(), err);
42 + llvm::raw_fd_ostream out(spath.c_str(), false, err);
43 write_asm_to_file(Target, *ir.module, out);