From 492f9cdf0046ba6d2452f8363d15b4449229b64c Mon Sep 17 00:00:00 2001 From: squirek Date: Mon, 21 Oct 2024 18:21:13 +0000 Subject: ada: The Library_Unit field was used for all sorts of different purposes, which led to confusing code. This patch further refines the previous work to fix several cases. gcc/ada/ChangeLog: * inline.adb (In_Main_Unit_Or_Subunit): Use Other_Comp_Unit instead of Spec_Or_Body_Lib_Unit. (Must_Inline): Use Other_Comp_Unit instead of Spec_Or_Body_Lib_Unit. --- gcc/ada/inline.adb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gcc') diff --git a/gcc/ada/inline.adb b/gcc/ada/inline.adb index 9fa5642..a133ec7 100644 --- a/gcc/ada/inline.adb +++ b/gcc/ada/inline.adb @@ -498,7 +498,7 @@ package body Inline is -- package of the subprogram to find more calls to be inlined. if Comp = Cunit (Main_Unit) - or else Comp = Spec_Or_Body_Lib_Unit (Cunit (Main_Unit)) + or else Comp = Other_Comp_Unit (Cunit (Main_Unit)) then Add_Call (E); return Inline_Package; @@ -4716,7 +4716,7 @@ package body Inline is end loop; return Comp = Cunit (Main_Unit) - or else Comp = Spec_Or_Body_Lib_Unit (Cunit (Main_Unit)); + or else Comp = Other_Comp_Unit (Cunit (Main_Unit)); end In_Main_Unit_Or_Subunit; ---------------- -- cgit v1.1