aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorPhilip Herron <philip.herron@embecosm.com>2022-02-11 10:11:25 +0000
committerPhilip Herron <philip.herron@embecosm.com>2022-02-11 10:11:25 +0000
commitd21ae240496a48628cf1beafcc192760ebe1be89 (patch)
tree699195b8041ca3d59bb5a2a45941aca39562585a /gcc
parentdf2dbbc0343afcca95d515d8843612b0334bc17b (diff)
downloadgcc-d21ae240496a48628cf1beafcc192760ebe1be89.zip
gcc-d21ae240496a48628cf1beafcc192760ebe1be89.tar.gz
gcc-d21ae240496a48628cf1beafcc192760ebe1be89.tar.bz2
Cleanup header usage and remove void_type wrapper
Diffstat (limited to 'gcc')
-rw-r--r--gcc/rust/rust-backend.h11
-rw-r--r--gcc/rust/rust-gcc.cc2
-rw-r--r--gcc/rust/rust-session-manager.cc19
-rw-r--r--gcc/rust/typecheck/rust-tycheck-dump.h3
4 files changed, 13 insertions, 22 deletions
diff --git a/gcc/rust/rust-backend.h b/gcc/rust/rust-backend.h
index c228f6b..56e15a3 100644
--- a/gcc/rust/rust-backend.h
+++ b/gcc/rust/rust-backend.h
@@ -29,12 +29,6 @@
#include "operator.h"
#include "tree.h"
-extern bool
-saw_errors (void);
-
-// TODO: Will have to be significantly modified to work with Rust and current
-// setup of gccrs
-
// Pointers to these types are created by the backend, passed to the
// frontend, and passed back to the backend. The types must be
// defined by the backend using these names.
@@ -76,11 +70,6 @@ public:
// Types.
- // Get a void type. This is used in (at least) two ways: 1) as the
- // return type of a function with no result parameters; 2)
- // unsafe.Pointer is represented as *void.
- virtual tree void_type () = 0;
-
// get unit-type
virtual tree unit_type () = 0;
diff --git a/gcc/rust/rust-gcc.cc b/gcc/rust/rust-gcc.cc
index b052ce2..cc5f4a90 100644
--- a/gcc/rust/rust-gcc.cc
+++ b/gcc/rust/rust-gcc.cc
@@ -117,8 +117,6 @@ public:
// Types.
- tree void_type () { return void_type_node; }
-
tree unit_type ()
{
static tree unit_type;
diff --git a/gcc/rust/rust-session-manager.cc b/gcc/rust/rust-session-manager.cc
index 0150a48..4e140fd 100644
--- a/gcc/rust/rust-session-manager.cc
+++ b/gcc/rust/rust-session-manager.cc
@@ -17,17 +17,8 @@
// <http://www.gnu.org/licenses/>.
// #include "rust-session-manager.h"
-#include <fstream>
-#include <sstream>
#include "rust-session-manager.h"
#include "rust-diagnostics.h"
-#include "diagnostic.h"
-#include "input.h"
-
-#include "target.h"
-#include "tm.h"
-#include "memmodel.h"
-#include "tm_p.h"
//#include "rust-target.h"
/*TODO This isn't (currently?) necessary, but if '#include'd after '#include
@@ -54,6 +45,16 @@
#include "rust-ast-resolve-unused.h"
#include "rust-compile.h"
+#include "diagnostic.h"
+#include "input.h"
+#include "target.h"
+#include "tm.h"
+#include "memmodel.h"
+#include "tm_p.h"
+
+extern bool
+saw_errors (void);
+
extern Linemap *
rust_get_linemap ();
diff --git a/gcc/rust/typecheck/rust-tycheck-dump.h b/gcc/rust/typecheck/rust-tycheck-dump.h
index 1b19123..0bcc6c8 100644
--- a/gcc/rust/typecheck/rust-tycheck-dump.h
+++ b/gcc/rust/typecheck/rust-tycheck-dump.h
@@ -22,6 +22,9 @@
#include "rust-hir-type-check-base.h"
#include "rust-hir-full.h"
+#include <fstream>
+#include <sstream>
+
namespace Rust {
namespace Resolver {