From bab743eb203ebca700379cad0a55a07de92122fd Mon Sep 17 00:00:00 2001
From: Bob Dubner <rdubner@symas.com>
Date: Tue, 24 Dec 2024 00:00:32 -0500
Subject: [PATCH] Trim genapi.cc .h files

---
 gcc/cobol/ChangeLog      |  1 +
 gcc/cobol/cobol-system.h |  3 +++
 gcc/cobol/genapi.cc      | 22 ++--------------------
 3 files changed, 6 insertions(+), 20 deletions(-)

diff --git a/gcc/cobol/ChangeLog b/gcc/cobol/ChangeLog
index 02dbd1ab5d94..c8b68f5d2127 100644
--- a/gcc/cobol/ChangeLog
+++ b/gcc/cobol/ChangeLog
@@ -14,3 +14,4 @@
 	trimmed .h files in except.cc
 	trimmed .h files in gcobolspec.cc
 	trimmed .h files in genapi.cc
+	trimmed .h files in gengen.cc
diff --git a/gcc/cobol/cobol-system.h b/gcc/cobol/cobol-system.h
index dca672cd460c..86d4faea2e21 100644
--- a/gcc/cobol/cobol-system.h
+++ b/gcc/cobol/cobol-system.h
@@ -42,7 +42,10 @@
 
 #include <string>
 #include <vector>
+
+
 #include <unordered_map>
+#include <unordered_set>
 
 
 #include "system.h"
diff --git a/gcc/cobol/genapi.cc b/gcc/cobol/genapi.cc
index 23e0c28f0d63..064ef8f272b2 100644
--- a/gcc/cobol/genapi.cc
+++ b/gcc/cobol/genapi.cc
@@ -27,29 +27,13 @@
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
-#include <err.h> 
-#include <stdbool.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <ctype.h>
-#include <vector>
-#include <string>
-#include <unordered_map>
-#include <unordered_set>
-#include <chrono>
-#include <time.h>
-#include <math.h>
+#include "cobol-system.h"
 
-#include "config.h"
-#include "system.h"
+#include <math.h>
 #include "coretypes.h"
-#include "target.h"
 #include "tree.h"
 #include "tree-iterator.h"
 #include "stringpool.h"
-#include "cgraph.h"
-#include "gimplify.h"
-#include "dfp.h"
 
 #define HOWEVER_GCC_DEFINES_TREE 1
 #include "symbols.h"
@@ -63,8 +47,6 @@
 #include "valconv.h"
 #include "show_parse.h"
 
-extern void print_gimple_nodes(const char *filename, tree root);
-
 // This structure is returned by the parser_performxxx() routines, and gets
 // handed to the parser_perform_modify routines
 struct cbl_parser_mod
-- 
GitLab