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.
This commit is contained in:
Benjamin Bannier 2024-07-11 13:49:57 +02:00
parent e99b94c18f
commit 24d3454d61

View file

@ -4,10 +4,8 @@
#include <getopt.h> #include <getopt.h>
#include <algorithm>
#include <memory> #include <memory>
#include <string> #include <string>
#include <type_traits>
#include <utility> #include <utility>
#include <vector> #include <vector>
@ -46,7 +44,7 @@ struct VisitorTypes : public spicy::visitor::PreOrder {
module = n->scopeID(); module = n->scopeID();
path = n->uid().path; path = n->uid().path;
if ( is_resolved ) if ( is_resolved && ! n->skipImplementation() )
glue->addSpicyModule(module, path); glue->addSpicyModule(module, path);
} }