From 251c9b8a5aeb24d29711c5e600bb09db8bb9c23c Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Tue, 16 Dec 2014 08:52:44 +0100 Subject: ortho_llvm: fix crash with debug info. --- src/ortho/llvm/ortho_llvm.adb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/ortho') diff --git a/src/ortho/llvm/ortho_llvm.adb b/src/ortho/llvm/ortho_llvm.adb index b0049617c..d57976ad2 100644 --- a/src/ortho/llvm/ortho_llvm.adb +++ b/src/ortho/llvm/ortho_llvm.adb @@ -248,7 +248,7 @@ package body Ortho_LLVM is -- FIXME: check if INSN is really an instruction procedure Set_Insn_Dbg (Insn : ValueRef) is begin - if Flag_Debug_Line then + if Flag_Debug_Line and then IsAInstruction (Insn) /= Null_ValueRef then if Dbg_Current_Line /= Dbg_Insn_MD_Line then declare Vals : ValueRefArray (0 .. 3); @@ -1249,7 +1249,7 @@ package body Ortho_LLVM is if Build /= null then pragma Assert (Res = Null_ValueRef); - Res := Build.all (Builder, Left.LLVM, Right.LLVM, Empty_Cstring); + Res := Build.all (Builder, Left.LLVM, Right.LLVM, Empty_Cstring); end if; if Res = Null_ValueRef then -- cgit v1.2.3