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

Ben Barham via lldb-commits lldb-commits at lists.llvm.org
Wed Sep 13 11:29:32 PDT 2023


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

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`.

>From 2f65db88d9249ca38fb86438fd92ef2f734d39b3 Mon Sep 17 00:00:00 2001
From: Ben Barham <ben_barham at apple.com>
Date: Wed, 13 Sep 2023 11:14:35 -0700
Subject: [PATCH] Revert "[lldb] Fix the way we set up the lldb modules
 infrastructure."

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`.
---
 .../Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp  | 3 ++-
 .../lang/objc/modules-compile-error/TestModulesCompileError.py | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

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 'syntax_error_for_lldb_to_find'",
+                "module.h:4:1: error: unknown type name 'syntax_error_for_lldb_to_find'",
                 "syntax_error_for_lldb_to_find // comment that tests source printing",
                 "could not build module 'LLDBTestModule'",
             ],



More information about the lldb-commits mailing list