فهرست منبع

* changed shortstring llvm representation to a plain array of bytes, so
it can be directly indexed rather than that we need to separately
select the byte or data (just like at the Pascal level, and how it
is/will be handled in the code generator)

git-svn-id: branches/hlcgllvm@27015 -

Jonas Maebe 11 سال پیش
والد
کامیت
7d61ecf5ba
1فایلهای تغییر یافته به همراه2 افزوده شده و 2 حذف شده
  1. 2 2
      compiler/llvm/llvmdef.pas

+ 2 - 2
compiler/llvm/llvmdef.pas

@@ -160,9 +160,9 @@ implementation
                 st_shortstring:
                 st_shortstring:
                   { length byte followed by string bytes }
                   { length byte followed by string bytes }
                   if tstringdef(def).len>0 then
                   if tstringdef(def).len>0 then
-                    encodedstr:=encodedstr+'{i8, ['+tostr(tstringdef(def).len)+' x i8]}'
+                    encodedstr:=encodedstr+'['+tostr(tstringdef(def).len+1)+' x i8]}'
                   else
                   else
-                    encodedstr:=encodedstr+'{i8, [0 x i8]}';
+                    encodedstr:=encodedstr+'[0 x i8]';
                 else
                 else
                   internalerror(2013100201);
                   internalerror(2013100201);
               end;
               end;