mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-21 15:23:13 +01:00
[svn r97] Fixed bug with main(string[] args) on 32 bit systems. 64bit worked.
This commit is contained in:
@@ -680,7 +680,9 @@ void DtoMain()
|
||||
llvm::Value* arr = new llvm::AllocaInst(at->getContainedType(1)->getContainedType(0), func->arg_begin(), "argstorage", apt);
|
||||
llvm::Value* a = new llvm::AllocaInst(at, "argarray", apt);
|
||||
llvm::Value* ptr = DtoGEPi(a,0,0,"tmp",bb);
|
||||
llvm::Value* v = new llvm::ZExtInst(args[0], DtoSize_t(), "tmp", bb);
|
||||
llvm::Value* v = args[0];
|
||||
if (v->getType() != DtoSize_t())
|
||||
v = new llvm::ZExtInst(v, DtoSize_t(), "tmp", bb);
|
||||
new llvm::StoreInst(v,ptr,bb);
|
||||
ptr = DtoGEPi(a,0,1,"tmp",bb);
|
||||
new llvm::StoreInst(arr,ptr,bb);
|
||||
|
||||
Reference in New Issue
Block a user