]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Populate -original dump for Cobol
authorRichard Biener <rguenther@suse.de>
Tue, 11 Mar 2025 12:19:55 +0000 (13:19 +0100)
committerRichard Biener <rguenth@gcc.gnu.org>
Tue, 18 Mar 2025 17:26:27 +0000 (18:26 +0100)
The following implements -fdump-tree-original dumping for cobol,
mimicing what the D frontend does.

gcc/cobol/
* gengen.cc (gg_finalize_function): Dump to TDI_original.

gcc/cobol/gengen.cc

index d0601e0c6c450ccd3de31b7b336fc2c51c00d767..2796b7facdbd138f2bdea04867f78af92e87fd82 100644 (file)
 #include "cbldiag.h"
 #include "symbols.h"
 #include "gengen.h"
+#include "dumpfile.h"
 
 // We are limiting the programmer to functions with 512 or fewer arguments.
 // Don't like it?  Cry me a river.
@@ -2926,6 +2927,8 @@ gg_finalize_function()
     cgraph_node::finalize_function (current_function->function_decl, true);
     }
 
+  dump_function (TDI_original, current_function->function_decl);
+
   if( gg_trans_unit.function_stack.back().context_count )
     {
     cbl_internal_error("Residual context count!");