From 24d3454d619c0c0db4b4a6c4fd91ca43c78dca81 Mon Sep 17 00:00:00 2001 From: Benjamin Bannier Date: Thu, 11 Jul 2024 13:49:57 +0200 Subject: [PATCH] Do not emit hook files for builtin modules We would previously emit a C++ file with hooks for at least the builtin `spicy` module even though that module like any other builtin module never contains implementations of hooks for types in user code. This patch prevents modules with skipped implementations (such as our builtin modules) from being added to the compilation which prevents generating their hook files. --- src/spicy/spicyz/driver.cc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/spicy/spicyz/driver.cc b/src/spicy/spicyz/driver.cc index 8a4eee216a..1bfcb696c8 100644 --- a/src/spicy/spicyz/driver.cc +++ b/src/spicy/spicyz/driver.cc @@ -4,10 +4,8 @@ #include -#include #include #include -#include #include #include @@ -46,7 +44,7 @@ struct VisitorTypes : public spicy::visitor::PreOrder { module = n->scopeID(); path = n->uid().path; - if ( is_resolved ) + if ( is_resolved && ! n->skipImplementation() ) glue->addSpicyModule(module, path); }