-
Notifications
You must be signed in to change notification settings - Fork 14.4k
[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
[LLDB] Fix build after TargetInfo::adjust signature change #147727
Conversation
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.
@llvm/pr-subscribers-lldb Author: Yaxun (Sam) Liu (yxsamliu) ChangesFixes 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:
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]))
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks!
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]))
|
… and ClangModulesDeclVendor.cpp This wasn't addressed as part of #147727
…lvm#147727)" This reverts commit 92fbfc2.
introduced by llvm#147727
introduced by llvm#147727
…nParser.cpp and ClangModulesDeclVendor.cpp This wasn't addressed as part of llvm/llvm-project#147727
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.