From 2daaa22a15c69b89120a64d1144f99ca13ac689c Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Fri, 26 Jul 2024 14:47:23 +0200 Subject: [PATCH] LibWeb: Stop trying to guess include paths in IDL codegen It turns out we were already generating all the necessary include statements, and we can simply remove all this goofy code soup that uses the C preprocessor to speculatively look for include files. --- .../BindingsGenerator/IDLGenerators.cpp | 48 ------------------- 1 file changed, 48 deletions(-) diff --git a/Meta/Lagom/Tools/CodeGenerators/LibWeb/BindingsGenerator/IDLGenerators.cpp b/Meta/Lagom/Tools/CodeGenerators/LibWeb/BindingsGenerator/IDLGenerators.cpp index faaee9400ce..0606e873d47 100644 --- a/Meta/Lagom/Tools/CodeGenerators/LibWeb/BindingsGenerator/IDLGenerators.cpp +++ b/Meta/Lagom/Tools/CodeGenerators/LibWeb/BindingsGenerator/IDLGenerators.cpp @@ -274,11 +274,8 @@ static void generate_include_for_iterator(auto& generator, auto& iterator_path) { auto iterator_generator = generator.fork(); iterator_generator.set("iterator_class.path", iterator_path); - // FIXME: These may or may not exist, because REASONS. iterator_generator.append(R"~~~( -//#if __has_include() # include -//#endif )~~~"); } @@ -4361,47 +4358,6 @@ void generate_constructor_implementation(IDL::Interface const& interface, String #include #include #include -#if __has_include() -# include -#elif __has_include() -# include -#elif __has_include() -# include -#elif __has_include() -# include -#elif __has_include() -# include -#elif __has_include() -# include -#elif __has_include() -# include -#elif __has_include() -# include -#elif __has_include() -# include -#elif __has_include() -# include -#elif __has_include() -# include -#elif __has_include() -# include -#elif __has_include() -# include -#elif __has_include() -# include -#elif __has_include() -# include -#elif __has_include() -# include -#elif __has_include() -# include -#elif __has_include() -# include -#elif __has_include() -# include -#elif __has_include() -# include -#endif #include #include #include @@ -4796,10 +4752,6 @@ void generate_iterator_prototype_implementation(IDL::Interface const& interface, #include #include #include - -#if __has_include() -# include -#endif )~~~"); emit_includes_for_all_imports(interface, generator, true);