summaryrefslogtreecommitdiff
path: root/src/ortho/llvm
diff options
context:
space:
mode:
authorTristan Gingold2014-12-16 08:52:44 +0100
committerTristan Gingold2014-12-16 08:52:44 +0100
commit251c9b8a5aeb24d29711c5e600bb09db8bb9c23c (patch)
treedf18dfd854c9c4601ea4a2e55039d85f6549312c /src/ortho/llvm
parent7591af39768c4a77b6ad2a7bda131c4d6caa76aa (diff)
downloadghdl-251c9b8a5aeb24d29711c5e600bb09db8bb9c23c.tar.gz
ghdl-251c9b8a5aeb24d29711c5e600bb09db8bb9c23c.tar.bz2
ghdl-251c9b8a5aeb24d29711c5e600bb09db8bb9c23c.zip
ortho_llvm: fix crash with debug info.
Diffstat (limited to 'src/ortho/llvm')
-rw-r--r--src/ortho/llvm/ortho_llvm.adb4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ortho/llvm/ortho_llvm.adb b/src/ortho/llvm/ortho_llvm.adb
index b004961..d57976a 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