comparison gcc/ada/exp_prag.adb @ 145:1830386684a0

gcc-9.2.0
author anatofuz
date Thu, 13 Feb 2020 11:34:05 +0900
parents 84e7813d76e9
children
comparison
equal deleted inserted replaced
131:84e7813d76e9 145:1830386684a0
4 -- -- 4 -- --
5 -- E X P _ P R A G -- 5 -- E X P _ P R A G --
6 -- -- 6 -- --
7 -- B o d y -- 7 -- B o d y --
8 -- -- 8 -- --
9 -- Copyright (C) 1992-2018, Free Software Foundation, Inc. -- 9 -- Copyright (C) 1992-2019, Free Software Foundation, Inc. --
10 -- -- 10 -- --
11 -- GNAT is free software; you can redistribute it and/or modify it under -- 11 -- GNAT is free software; you can redistribute it and/or modify it under --
12 -- terms of the GNU General Public License as published by the Free Soft- -- 12 -- terms of the GNU General Public License as published by the Free Soft- --
13 -- ware Foundation; either version 3, or (at your option) any later ver- -- 13 -- ware Foundation; either version 3, or (at your option) any later ver- --
14 -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- 14 -- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
1634 end if; 1634 end if;
1635 1635
1636 Expr := Get_Pragma_Arg (First (Pragma_Argument_Associations (IC_Prag))); 1636 Expr := Get_Pragma_Arg (First (Pragma_Argument_Associations (IC_Prag)));
1637 Loc := Sloc (IC_Prag); 1637 Loc := Sloc (IC_Prag);
1638 1638
1639 -- Nothing to do when the pragma is ignored because its semantics are
1640 -- suppressed.
1641
1642 if Is_Ignored (IC_Prag) then
1643 return;
1644
1639 -- Nothing to do when the pragma or its argument are illegal because 1645 -- Nothing to do when the pragma or its argument are illegal because
1640 -- there is no valid expression to check. 1646 -- there is no valid expression to check.
1641 1647
1642 if Error_Posted (IC_Prag) or else Error_Posted (Expr) then 1648 elsif Error_Posted (IC_Prag) or else Error_Posted (Expr) then
1643 return; 1649 return;
1644 end if; 1650 end if;
1645 1651
1646 -- Obtain the various lists of the context where the individual pieces 1652 -- Obtain the various lists of the context where the individual pieces
1647 -- of the initial condition procedure are to be inserted. 1653 -- of the initial condition procedure are to be inserted.
1686 1692
1687 -- The initial condition procedure requires debug info when initial 1693 -- The initial condition procedure requires debug info when initial
1688 -- condition is subject to Source Coverage Obligations. 1694 -- condition is subject to Source Coverage Obligations.
1689 1695
1690 if Generate_SCO then 1696 if Generate_SCO then
1691 Set_Needs_Debug_Info (Proc_Id); 1697 Set_Debug_Info_Needed (Proc_Id);
1692 end if; 1698 end if;
1693 1699
1694 -- Generate: 1700 -- Generate:
1695 -- procedure <Pack_Id>Initial_Condition is 1701 -- procedure <Pack_Id>Initial_Condition is
1696 -- begin 1702 -- begin
1720 -- condition is subject to Source Coverage Obligations. 1726 -- condition is subject to Source Coverage Obligations.
1721 1727
1722 Proc_Body_Id := Defining_Entity (Proc_Body); 1728 Proc_Body_Id := Defining_Entity (Proc_Body);
1723 1729
1724 if Generate_SCO then 1730 if Generate_SCO then
1725 Set_Needs_Debug_Info (Proc_Body_Id); 1731 Set_Debug_Info_Needed (Proc_Body_Id);
1726 end if; 1732 end if;
1727 1733
1728 -- The location of the initial condition procedure call must be as close 1734 -- The location of the initial condition procedure call must be as close
1729 -- as possible to the intended semantic location of the check because 1735 -- as possible to the intended semantic location of the check because
1730 -- the ABE mechanism relies heavily on accurate locations. 1736 -- the ABE mechanism relies heavily on accurate locations.