Browse Source

* correctly handle empty ansistring constants for llvm

git-svn-id: branches/hlcgllvm@30127 -
Jonas Maebe 10 years ago
parent
commit
eba3f534de
1 changed files with 8 additions and 0 deletions
  1. 8 0
      compiler/llvm/nllvmtcon.pas

+ 8 - 0
compiler/llvm/nllvmtcon.pas

@@ -253,6 +253,14 @@ implementation
       field: tfieldvarsym;
       dataptrdef: tdef;
     begin
+      { nil pointer? }
+      if not assigned(ll.lab) then
+        begin
+          if ll.ofs<>0 then
+            internalerror(2015030701);
+          inherited;
+          exit;
+        end;
       { if the returned offset is <> 0, then the string data
         starts at that offset -> translate to a field for the
         high level code generator }