Skip to content

[LLDB] Fix build after TargetInfo::adjust signature change #147727

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 9, 2025

Conversation

yxsamliu
Copy link
Collaborator

@yxsamliu yxsamliu commented Jul 9, 2025

Fixes buildbot failure on lldb-x86_64-debian due to #146620

https://lab.llvm.org/buildbot/#/builders/162/builds/26414

Update LLDB calls to TargetInfo::adjust() to use the new 3-parameter signature introduced in beea2a9. Pass nullptr for AuxTarget since LLDB doesn't use auxiliary targets in these contexts.

Update LLDB calls to TargetInfo::adjust() to use the new 3-parameter
signature introduced in beea2a9.
Pass nullptr for AuxTarget since LLDB doesn't use auxiliary targets
in these contexts.

Fixes buildbot failure on lldb-x86_64-debian.
@llvmbot
Copy link
Member

llvmbot commented Jul 9, 2025

@llvm/pr-subscribers-lldb

Author: Yaxun (Sam) Liu (yxsamliu)

Changes

Fixes buildbot failure on lldb-x86_64-debian due to #146620

https://lab.llvm.org/buildbot/#/builders/162/builds/26414

Update LLDB calls to TargetInfo::adjust() to use the new 3-parameter signature introduced in beea2a9. Pass nullptr for AuxTarget since LLDB doesn't use auxiliary targets in these contexts.


Full diff: https://github.com/llvm/llvm-project/pull/147727.diff

2 Files Affected:

  • (modified) lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp (+1-1)
  • (modified) lldb/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp (+1-1)
diff --git a/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp b/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp
index 7aa9cae5a5614..657efb6de4a08 100644
--- a/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp
+++ b/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp
@@ -831,7 +831,7 @@ ClangExpressionParser::ClangExpressionParser(
   // FIXME: We shouldn't need to do this, the target should be immutable once
   // created. This complexity should be lifted elsewhere.
   m_compiler->getTarget().adjust(m_compiler->getDiagnostics(),
-                                 m_compiler->getLangOpts());
+                                 m_compiler->getLangOpts(), /*AuxTarget=*/nullptr);
 
   // 5. Set up the diagnostic buffer for reporting errors
   auto diag_mgr = new ClangDiagnosticManagerAdapter(
diff --git a/lldb/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp b/lldb/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp
index 284e5bc6fb1e5..8de8c157cd025 100644
--- a/lldb/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp
+++ b/lldb/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp
@@ -757,7 +757,7 @@ ClangModulesDeclVendor::Create(Target &target) {
   if (!instance->hasTarget())
     return nullptr;
 
-  instance->getTarget().adjust(*diagnostics_engine, instance->getLangOpts());
+  instance->getTarget().adjust(*diagnostics_engine, instance->getLangOpts(), /*AuxTarget=*/nullptr);
 
   if (!action->BeginSourceFile(*instance,
                                instance->getFrontendOpts().Inputs[0]))

Copy link
Member

@Michael137 Michael137 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks!

@yxsamliu yxsamliu merged commit 92fbfc2 into llvm:main Jul 9, 2025
6 of 10 checks passed
Copy link

github-actions bot commented Jul 9, 2025

⚠️ C/C++ code formatter, clang-format found issues in your code. ⚠️

You can test this locally with the following command:
git-clang-format --diff HEAD~1 HEAD --extensions cpp -- lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp lldb/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp
View the diff from clang-format here.
diff --git a/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp b/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp
index 657efb6de..3995bc002 100644
--- a/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp
+++ b/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp
@@ -831,7 +831,8 @@ ClangExpressionParser::ClangExpressionParser(
   // FIXME: We shouldn't need to do this, the target should be immutable once
   // created. This complexity should be lifted elsewhere.
   m_compiler->getTarget().adjust(m_compiler->getDiagnostics(),
-                                 m_compiler->getLangOpts(), /*AuxTarget=*/nullptr);
+                                 m_compiler->getLangOpts(),
+                                 /*AuxTarget=*/nullptr);
 
   // 5. Set up the diagnostic buffer for reporting errors
   auto diag_mgr = new ClangDiagnosticManagerAdapter(
diff --git a/lldb/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp b/lldb/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp
index 8de8c157c..2f838b3f0 100644
--- a/lldb/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp
+++ b/lldb/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp
@@ -757,7 +757,8 @@ ClangModulesDeclVendor::Create(Target &target) {
   if (!instance->hasTarget())
     return nullptr;
 
-  instance->getTarget().adjust(*diagnostics_engine, instance->getLangOpts(), /*AuxTarget=*/nullptr);
+  instance->getTarget().adjust(*diagnostics_engine, instance->getLangOpts(),
+                               /*AuxTarget=*/nullptr);
 
   if (!action->BeginSourceFile(*instance,
                                instance->getFrontendOpts().Inputs[0]))

Michael137 added a commit that referenced this pull request Jul 9, 2025
… and ClangModulesDeclVendor.cpp

This wasn't addressed as part of #147727
yxsamliu added a commit to yxsamliu/llvm-project that referenced this pull request Jul 9, 2025
yxsamliu added a commit to yxsamliu/llvm-project that referenced this pull request Jul 9, 2025
yxsamliu added a commit to yxsamliu/llvm-project that referenced this pull request Jul 9, 2025
llvm-sync bot pushed a commit to arm/arm-toolchain that referenced this pull request Jul 9, 2025
…nParser.cpp and ClangModulesDeclVendor.cpp

This wasn't addressed as part of llvm/llvm-project#147727
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants