diff options
Diffstat (limited to 'src/ortho/mcode/ortho_code-x86-abi.adb')
-rw-r--r-- | src/ortho/mcode/ortho_code-x86-abi.adb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/ortho/mcode/ortho_code-x86-abi.adb b/src/ortho/mcode/ortho_code-x86-abi.adb index 38cfc92d1..8af6a57aa 100644 --- a/src/ortho/mcode/ortho_code-x86-abi.adb +++ b/src/ortho/mcode/ortho_code-x86-abi.adb @@ -92,6 +92,7 @@ package body Ortho_Code.X86.Abi is procedure Finish_Body (Subprg : Subprogram_Data_Acc) is + pragma Assert (Subprg = Cur_Subprg); use Ortho_Code.Flags; Child : Subprogram_Data_Acc; @@ -125,9 +126,11 @@ package body Ortho_Code.X86.Abi is -- Recurse on nested subprograms. Child := Subprg.First_Child; while Child /= null loop + Cur_Subprg := Child; Finish_Body (Child); Child := Child.Brother; end loop; + Cur_Subprg := Subprg; if Get_Decl_Depth (Subprg.D_Decl) = O_Toplevel then if Flag_Debug = Debug_Dwarf then @@ -146,6 +149,11 @@ package body Ortho_Code.X86.Abi is end if; end Finish_Body; + procedure Finish_Body is + begin + Finish_Body (Cur_Subprg); + end Finish_Body; + procedure Expand_Const_Decl (Decl : O_Dnode) is begin Emits.Emit_Const_Decl (Decl); |