Explorar o código

* fixed expectloc for llvm bool_2_int typeconversions where the location
doesn't change

git-svn-id: trunk@32248 -

Jonas Maebe %!s(int64=9) %!d(string=hai) anos
pai
achega
4f54f8b3bd
Modificáronse 1 ficheiros con 5 adicións e 1 borrados
  1. 5 1
      compiler/llvm/nllvmcnv.pas

+ 5 - 1
compiler/llvm/nllvmcnv.pas

@@ -78,7 +78,11 @@ function tllvmtypeconvnode.first_int_to_bool: tnode;
   begin
     result:=inherited;
     if not assigned(result) then
-      expectloc:=LOC_JUMP;
+      begin
+        if not((nf_explicit in flags) and
+               not(left.location.loc in [LOC_FLAGS,LOC_JUMP])) then
+          expectloc:=LOC_JUMP;
+      end;
   end;