Clean up #includes

Remove unused headers, and avoid relying on transitive inclusions

`include-what-you-use` has been very useful for this!
This commit is contained in:
ISSOtm
2024-03-28 01:16:51 +01:00
parent cae7b5dcf6
commit e5078aba3b
38 changed files with 19 additions and 83 deletions

View File

@@ -2,7 +2,6 @@
#include "asm/charmap.hpp"
#include <errno.h>
#include <stack>
#include <stdio.h>
#include <stdlib.h>
@@ -11,8 +10,6 @@
#include "util.hpp"
#include "asm/main.hpp"
#include "asm/output.hpp"
#include "asm/warning.hpp"
// Charmaps are stored using a structure known as "trie".

View File

@@ -6,9 +6,6 @@
#include <math.h>
#include "asm/symbol.hpp"
#include "asm/warning.hpp"
#ifndef M_PI
#define M_PI 3.14159265358979323846
#endif

View File

@@ -10,7 +10,6 @@
#include <stack>
#include <stdio.h>
#include <stdlib.h>
#include <string_view>
#include "error.hpp"
#include "helpers.hpp"

View File

@@ -12,7 +12,6 @@
#include <inttypes.h>
#include <limits.h>
#include <math.h>
#include <new>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

View File

@@ -45,7 +45,6 @@
%code {
#include <algorithm>
#include <ctype.h>
#include <errno.h>
#include <inttypes.h>
#include <stdio.h>
#include <stdlib.h>

View File

@@ -3,7 +3,6 @@
#include "asm/rpn.hpp"
#include <assert.h>
#include <errno.h>
#include <inttypes.h>
#include <limits.h>
#include <stdio.h>
@@ -13,7 +12,6 @@
#include "opmath.hpp"
#include "asm/main.hpp"
#include "asm/output.hpp"
#include "asm/section.hpp"
#include "asm/symbol.hpp"

View File

@@ -12,6 +12,8 @@
#include <stdlib.h>
#include <string.h>
#include "helpers.hpp"
#include "asm/fstack.hpp"
#include "asm/lexer.hpp"
#include "asm/main.hpp"

View File

@@ -3,13 +3,11 @@
#include "asm/symbol.hpp"
#include <assert.h>
#include <errno.h>
#include <inttypes.h>
#include <stdio.h>
#include <unordered_map>
#include "error.hpp"
#include "helpers.hpp"
#include "version.hpp"
#include "asm/fstack.hpp"