From bc74909308ccc11ff484b9e73897aa20b4a1f560 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sun, 4 Sep 2022 17:12:39 +0200 Subject: [PATCH] LibWeb: Remove many unnecessary #includes in generated code --- .../LibWeb/WrapperGenerator/IDLGenerators.cpp | 33 ------------------- 1 file changed, 33 deletions(-) diff --git a/Meta/Lagom/Tools/CodeGenerators/LibWeb/WrapperGenerator/IDLGenerators.cpp b/Meta/Lagom/Tools/CodeGenerators/LibWeb/WrapperGenerator/IDLGenerators.cpp index 5a7d7b4f1c..6684828861 100644 --- a/Meta/Lagom/Tools/CodeGenerators/LibWeb/WrapperGenerator/IDLGenerators.cpp +++ b/Meta/Lagom/Tools/CodeGenerators/LibWeb/WrapperGenerator/IDLGenerators.cpp @@ -269,21 +269,6 @@ static String make_input_acceptable_cpp(String const& input) return input.replace("-"sv, "_"sv, ReplaceMode::All); } -static void generate_include_for_wrapper(auto& generator, auto& wrapper_name) -{ - auto wrapper_generator = generator.fork(); - wrapper_generator.set("wrapper_class", wrapper_name); - // FIXME: These may or may not exist, because REASONS. - wrapper_generator.append(R"~~~( -#if __has_include() -# include -#endif -#if __has_include() -# include -#endif -)~~~"); -} - static void generate_include_for_iterator(auto& generator, auto& iterator_path, auto& iterator_name) { auto iterator_generator = generator.fork(); @@ -294,15 +279,6 @@ static void generate_include_for_iterator(auto& generator, auto& iterator_path, //#if __has_include() # include //#endif -#if __has_include() -# include -#endif -#if __has_include() -# include -#endif -#if __has_include() -# include -#endif )~~~"); } @@ -353,9 +329,6 @@ static void emit_includes_for_all_imports(auto& interface, auto& generator, bool auto iterator_path = String::formatted("{}Iterator", interface->fully_qualified_name.replace("::"sv, "/"sv, ReplaceMode::All)); generate_include_for_iterator(generator, iterator_path, iterator_name); } - - if (interface->wrapper_class != "Wrapper") - generate_include_for_wrapper(generator, interface->wrapper_class); } } @@ -1970,9 +1943,6 @@ void generate_constructor_implementation(IDL::Interface const& interface) #include #include #include -#if __has_include() -#include -#endif #include #include #if __has_include() @@ -2309,9 +2279,6 @@ void generate_prototype_implementation(IDL::Interface const& interface) #include #include #include -#if __has_include() -#include -#endif #include #include #include