[Lldb-commits] [lldb] Revert "[lldb] Fix the way we set up the lldb modules infrastructure." (PR #66271)

via lldb-commits lldb-commits at lists.llvm.org
Wed Sep 13 11:30:38 PDT 2023


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-lldb
            
<details>
<summary>Changes</summary>
This reverts commit c95a0c91c0de66eb1066f23c69332522656f188e.

llvm#65683 split `-fincremental-extensions` and `IncrementalProcessing` such that `IncrementalProcessing` can be used to extend the lifetime of various datastructures without parsing changes. LLDB really should not be parsing any differently to a regular compile, so switch back to using just `IncrementalProcessing`.
--
Full diff: https://github.com/llvm/llvm-project/pull/66271.diff

2 Files Affected:

- (modified) lldb/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp (+2-1) 
- (modified) lldb/test/API/lang/objc/modules-compile-error/TestModulesCompileError.py (+1-1) 


<pre>
diff --git a/lldb/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp b/lldb/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp
index 5ce0d35378230cf..86d5ca1b125df3f 100644
--- a/lldb/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp
+++ b/lldb/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp
@@ -670,7 +670,6 @@ ClangModulesDeclVendor::Create(Target &target) {
       arch.GetTriple().str(),
       "-fmodules-validate-system-headers",
       "-Werror=non-modular-include-in-framework-module",
-      "-Xclang=-fincremental-extensions",
       "-Rmodule-build"};
 
   target.GetPlatform()->AddClangModuleCompilationOptions(
@@ -765,6 +764,8 @@ ClangModulesDeclVendor::Create(Target &target) {
                                instance->getFrontendOpts().Inputs[0]))
     return nullptr;
 
+  instance->getPreprocessor().enableIncrementalProcessing();
+
   instance->createASTReader();
 
   instance->createSema(action->getTranslationUnitKind(), nullptr);
diff --git a/lldb/test/API/lang/objc/modules-compile-error/TestModulesCompileError.py b/lldb/test/API/lang/objc/modules-compile-error/TestModulesCompileError.py
index 36e302be2525b51..db6d74bfdb540a5 100644
--- a/lldb/test/API/lang/objc/modules-compile-error/TestModulesCompileError.py
+++ b/lldb/test/API/lang/objc/modules-compile-error/TestModulesCompileError.py
@@ -21,7 +21,7 @@ def test(self):
             "expr @import LLDBTestModule",
             error=True,
             substrs=[
-                "module.h:4:1: error: use of undeclared identifier &#x27;syntax_error_for_lldb_to_find&#x27;",
+                "module.h:4:1: error: unknown type name &#x27;syntax_error_for_lldb_to_find&#x27;",
                 "syntax_error_for_lldb_to_find // comment that tests source printing",
                 "could not build module &#x27;LLDBTestModule&#x27;",
             ],
</pre>
</details>


https://github.com/llvm/llvm-project/pull/66271


More information about the lldb-commits mailing list