Skip to content

Commit

Permalink
Move proc macro builders to their own file
Browse files Browse the repository at this point in the history
The code to build the required procedural macro symbols is rather long
and could be placed in it's own file.

gcc/rust/ChangeLog:

	* Make-lang.in: Add gcc/rust/backend/rust-compile-proc-macro.cc to the
	list of file to compile.
	* backend/rust-compile.cc (attribute_array): Move to
	rust-compile-proc-macro.cc
	(derive_proc_macro): Likewise.
	(bang_proc_macro): Likewise.
	(attribute_proc_macro): Likewise.
	(proc_macro_payload): Likewise.
	(proc_macro): Likewise.
	(proc_macro_buffer): Likewise.
	(entrypoint): Likewise.
	(proc_macro_array): Likewise.
	(CompileCrate::add_proc_macro_symbols): Likewise.
	* backend/rust-compile-proc-macro.cc: New file.

Signed-off-by: Pierre-Emmanuel Patry <[email protected]>
  • Loading branch information
P-E-P committed Oct 17, 2023
1 parent c41e22c commit 3e4e6a1
Show file tree
Hide file tree
Showing 3 changed files with 394 additions and 384 deletions.
1 change: 1 addition & 0 deletions gcc/rust/Make-lang.in
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ GRS_OBJS = \
rust/rust-compile-intrinsic.o \
rust/rust-compile-pattern.o \
rust/rust-compile-fnparam.o \
rust/rust-compile-proc-macro.o \
rust/rust-base62.o \
rust/rust-compile-item.o \
rust/rust-compile-implitem.o \
Expand Down
Loading

0 comments on commit 3e4e6a1

Please sign in to comment.