Mercurial > projects > ldc
diff gen/aa.cpp @ 133:44a95ac7368a trunk
[svn r137] Many fixes towards tango.io.Console working, but not quite there yet...
In particular, assertions has been fixed to include file/line info, and much more!
author | lindquist |
---|---|
date | Mon, 14 Jan 2008 05:11:54 +0100 |
parents | facc562f5674 |
children | 0e28624814e8 |
line wrap: on
line diff
--- a/gen/aa.cpp Fri Jan 11 17:57:40 2008 +0100 +++ b/gen/aa.cpp Mon Jan 14 05:11:54 2008 +0100 @@ -86,7 +86,7 @@ pkey = DtoBitCast(pkey, funcTy->getParamType(2)); // valuesize param - llvm::Value* valsize = DtoConstSize_t(gTargetData->getTypeSize(DtoType(type))); + llvm::Value* valsize = DtoConstSize_t(getABITypeSize(DtoType(type))); // build arg vector std::vector<llvm::Value*> args; @@ -99,7 +99,7 @@ llvm::Value* ret = gIR->ir->CreateCall(func, args.begin(), args.end(), "aa.index"); // cast return value - const llvm::Type* targettype = llvm::PointerType::get(DtoType(type)); + const llvm::Type* targettype = getPtrToType(DtoType(type)); if (ret->getType() != targettype) ret = DtoBitCast(ret, targettype);