From 02e4a27a355f14c930164a8c7117f2f9d118e7dc Mon Sep 17 00:00:00 2001 From: Jonas Maebe Date: Fri, 2 Dec 2016 12:33:09 +0000 Subject: [PATCH] * print internalerrors in case we still encounter stray constants not part of a typed constants * don't print superfluous newlines in typed constant definitions git-svn-id: trunk@35042 - --- compiler/llvm/agllvm.pas | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/compiler/llvm/agllvm.pas b/compiler/llvm/agllvm.pas index 9b5ad3a728..49f70f0c2b 100644 --- a/compiler/llvm/agllvm.pas +++ b/compiler/llvm/agllvm.pas @@ -831,8 +831,7 @@ implementation procedure TLLVMAssember.WriteRealConst(hp: tai_realconst; do_line: boolean); begin - if do_line and - (fdecllevel=0) then + if fdecllevel=0 then begin case tai_realconst(hp).realtyp of aitrealconst_s32bit: @@ -849,19 +848,20 @@ implementation else internalerror(2014050604); end; + internalerror(2016120202); end; case hp.realtyp of aitrealconst_s32bit: - writer.AsmWriteln(llvmdoubletostr(hp.value.s32val)); + writer.AsmWrite(llvmdoubletostr(hp.value.s32val)); aitrealconst_s64bit: writer.AsmWriteln(llvmdoubletostr(hp.value.s64val)); {$if defined(cpuextended) and defined(FPC_HAS_TYPE_EXTENDED)} aitrealconst_s80bit: - writer.AsmWriteln(llvmextendedtostr(hp.value.s80val)); + writer.AsmWrite(llvmextendedtostr(hp.value.s80val)); {$endif defined(cpuextended)} aitrealconst_s64comp: { handled as int64 most of the time in llvm } - writer.AsmWriteln(tostr(round(hp.value.s64compval))); + writer.AsmWrite(tostr(round(hp.value.s64compval))); else internalerror(2014062401); end; @@ -873,7 +873,7 @@ implementation consttyp: taiconst_type; begin if fdecllevel=0 then - writer.AsmWrite(asminfo^.comment+' const '); + internalerror(2016120203); consttyp:=hp.consttype; case consttyp of aitconst_got, @@ -916,8 +916,11 @@ implementation writer.AsmWrite('zeroinitializer') else writer.AsmWrite(tostr(hp.value)); +{ + // activate in case of debugging IE 2016120203 if fdecllevel=0 then writer.AsmLn; +} end; else internalerror(200704251); @@ -1113,7 +1116,7 @@ implementation ait_string : begin if fdecllevel=0 then - writer.AsmWrite(asminfo^.comment); + internalerror(2016120201); writer.AsmWrite('c"'); for i:=1 to tai_string(hp).len do begin @@ -1129,7 +1132,7 @@ implementation end; writer.AsmWrite(s); end; - writer.AsmWriteLn('"'); + writer.AsmWrite('"'); end; ait_label :