diff gen/toir.cpp @ 720:e177ae483f8e

Added inreg attribute where appropriate on x86 to follow ABI docs. Removed now unnecessary temporary variable in StringExp.
author Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
date Thu, 23 Oct 2008 00:34:46 +0200
parents 7261ff0f95ff
children f04dde6e882c
line wrap: on
line diff
--- a/gen/toir.cpp	Wed Oct 22 21:50:08 2008 +0200
+++ b/gen/toir.cpp	Thu Oct 23 00:34:46 2008 +0200
@@ -373,9 +373,7 @@
 
     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));