Skip to content

Commit 16a1e8a

Browse files
committed
This setups an initial frame work for our resolution step for the pipeline
More work is required but it takes advantage of the vistior pattern from the AST so we can do this without RTTI and dynamic_casts. More passes on the AST AKA our HIR should follow this pattern. Addresses: gcc-mirror#12
1 parent c7c6f78 commit 16a1e8a

13 files changed

+1923
-968
lines changed

gcc/rust/Make-lang.in

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ GRS_OBJS = \
6969
rust/rust-parse.o \
7070
rust/rust-ast-full-test.o \
7171
rust/rust-session-manager.o \
72+
rust/rust-resolution.o \
7273
$(END)
7374
# removed object files from here
7475

@@ -208,7 +209,7 @@ CFLAGS-rust/rust-lang.o += -DDEFAULT_TARGET_VERSION=\"$(version)\" \
208209
-DDEFAULT_TARGET_MACHINE=\"$(target_noncanonical)\"
209210

210211
# cross-folder includes - add new folders later
211-
RUST_INCLUDES = -I $(srcdir)/rust -I $(srcdir)/rust/lex -I $(srcdir)/rust/parse -I $(srcdir)/rust/ast
212+
RUST_INCLUDES = -I $(srcdir)/rust -I $(srcdir)/rust/lex -I $(srcdir)/rust/parse -I $(srcdir)/rust/ast -I $(srcdir)/rust/analysis
212213

213214
# add files that require cross-folder includes - currently rust-lang.o, rust-lex.o
214215
CFLAGS-rust/rust-lang.o += $(RUST_INCLUDES)
@@ -232,3 +233,8 @@ rust/%.o: rust/parse/%.cc
232233
rust/%.o: rust/ast/%.cc
233234
$(COMPILE) -std=c++11 $(RUST_INCLUDES) $<
234235
$(POSTCOMPILE)
236+
237+
# build rust/analysis files in rust folder
238+
rust/%.o: rust/analysis/%.cc
239+
$(COMPILE) -std=c++11 $(RUST_INCLUDES) $<
240+
$(POSTCOMPILE)

0 commit comments

Comments
 (0)