mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-02-28 01:23:14 +01:00
Added inreg attribute where appropriate on x86 to follow ABI docs.
Removed now unnecessary temporary variable in StringExp.
This commit is contained in:
@@ -373,9 +373,7 @@ DValue* StringExp::toElem(IRState* p)
|
||||
|
||||
if (dtype->ty == Tarray) {
|
||||
LLConstant* clen = llvm::ConstantInt::get(DtoSize_t(),len,false);
|
||||
LLValue* tmpmem = DtoAlloca(DtoType(dtype),"tempstring");
|
||||
DtoSetArray(tmpmem, clen, arrptr);
|
||||
return new DVarValue(type, tmpmem);
|
||||
return new DImValue(type, DtoConstSlice(clen, arrptr));
|
||||
}
|
||||
else if (dtype->ty == Tsarray) {
|
||||
const LLType* dstType = getPtrToType(LLArrayType::get(ct, len));
|
||||
|
||||
Reference in New Issue
Block a user