From da00c60dae0040185dc45039c4397f6e746548e9 Mon Sep 17 00:00:00 2001 From: Chuanqi Xu Date: Fri, 8 Mar 2024 10:12:51 +0800 Subject: [C++20] [Modules] Introduce reduced BMI (#75894) Close https://github.com/llvm/llvm-project/issues/71034 See https://discourse.llvm.org/t/rfc-c-20-modules-introduce-thin-bmi-and-decls-hash/74755 This patch introduces reduced BMI, which doesn't contain the definitions of functions and variables if its definitions won't contribute to the ABI. Testing is a big part of the patch. We want to make sure the reduced BMI contains the same behavior with the existing and relatively stable fatBMI. This is pretty helpful for further reduction. The user interfaces part it left to following patches to ease the reviewing. --- clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp') diff --git a/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp b/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp index 925879a..2446aee 100644 --- a/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp +++ b/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp @@ -65,6 +65,8 @@ CreateFrontendBaseAction(CompilerInstance &CI) { return std::make_unique(); case GenerateModuleInterface: return std::make_unique(); + case GenerateReducedModuleInterface: + return std::make_unique(); case GenerateHeaderUnit: return std::make_unique(); case GeneratePCH: return std::make_unique(); -- cgit v1.1