Browse Source

LLVM: enforce line information for invoke instructions

Like with call instructions, when generating debug information LLVM requires
line information for invoke instructions that may be inline
Jonas Maebe 1 year ago
parent
commit
569b35dfc4
1 changed files with 2 additions and 2 deletions
  1. 2 2
      compiler/llvm/dbgllvm.pas

+ 2 - 2
compiler/llvm/dbgllvm.pas

@@ -2925,7 +2925,7 @@ implementation
 
             if (hp.typ=ait_llvmins) and
                ((nolineinfolevel=0) or
-                (taillvm(hp).llvmopcode=la_call)) then
+                (taillvm(hp).llvmopcode in [la_call,la_invoke])) then
               begin
                 positionmeta:=nil;
                 { valid file -> add info }
@@ -2941,7 +2941,7 @@ implementation
                   end
                 { LLVM requires line info for call instructions that may
                   potentially be inlined }
-                else if taillvm(hp).llvmopcode=la_call then
+                else if taillvm(hp).llvmopcode in [la_call,la_invoke] then
                   begin
                     positionmeta:=filepos_getmetanode(tailineinfo(hp).fileinfo,procdeffileinfo,functionscope,true);
                   end;