[clang] [llvm] [mlir] [MC] Take MCAsmInfo by reference in MCContext and TargetMachine. NFC (PR #194280)
via cfe-commits
cfe-commits at lists.llvm.org
Sun Apr 26 20:53:36 PDT 2026
github-actions[bot] wrote:
<!--PREMERGE ADVISOR COMMENT: Linux-->
# :penguin: Linux x64 Test Results
* 139728 tests passed
* 2685 tests skipped
All executed tests passed, but another part of the build **failed**. Click on a failure below to see the details.
<details>
<summary>tools/lldb/source/Plugins/Instruction/MIPS64/CMakeFiles/lldbPluginInstructionMIPS64.dir/EmulateInstructionMIPS64.cpp.o</summary>
```
FAILED: tools/lldb/source/Plugins/Instruction/MIPS64/CMakeFiles/lldbPluginInstructionMIPS64.dir/EmulateInstructionMIPS64.cpp.o
sccache /opt/llvm/bin/clang++ -DHAVE_ROUND -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GLIBCXX_USE_CXX11_ABI=1 -D_GNU_SOURCE -D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_EXTENSIVE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/lldb/source/Plugins/Instruction/MIPS64 -I/home/gha/actions-runner/_work/llvm-project/llvm-project/lldb/source/Plugins/Instruction/MIPS64 -I/home/gha/actions-runner/_work/llvm-project/llvm-project/lldb/include -I/home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/lldb/include -I/home/gha/actions-runner/_work/llvm-project/llvm-project/build/include -I/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include -I/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/../clang/include -I/home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/lldb/../clang/include -I/home/gha/actions-runner/_work/llvm-project/llvm-project/lldb/source -I/home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/lldb/source -gmlt -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wno-pass-failed -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -Wno-unknown-pragmas -Wno-strict-aliasing -Wno-vla-extension -O3 -DNDEBUG -std=c++17 -UNDEBUG -fno-exceptions -funwind-tables -fno-rtti -MD -MT tools/lldb/source/Plugins/Instruction/MIPS64/CMakeFiles/lldbPluginInstructionMIPS64.dir/EmulateInstructionMIPS64.cpp.o -MF tools/lldb/source/Plugins/Instruction/MIPS64/CMakeFiles/lldbPluginInstructionMIPS64.dir/EmulateInstructionMIPS64.cpp.o.d -o tools/lldb/source/Plugins/Instruction/MIPS64/CMakeFiles/lldbPluginInstructionMIPS64.dir/EmulateInstructionMIPS64.cpp.o -c /home/gha/actions-runner/_work/llvm-project/llvm-project/lldb/source/Plugins/Instruction/MIPS64/EmulateInstructionMIPS64.cpp
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/lldb/source/Plugins/Instruction/MIPS64/EmulateInstructionMIPS64.cpp:9:
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/lldb/source/Plugins/Instruction/MIPS64/EmulateInstructionMIPS64.h:12:
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/lldb/include/lldb/Core/EmulateInstruction.h:15:
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/lldb/include/lldb/Core/Address.h:12:
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/lldb/include/lldb/Utility/Stream.h:13:
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/lldb/include/lldb/lldb-defines.h:12:
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/lldb/include/lldb/lldb-types.h:13:
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/lldb/include/lldb/lldb-forward.h:12:
In file included from /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/memory:78:
/usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/unique_ptr.h:1070:34: error: no matching constructor for initialization of 'llvm::MCContext'
1070 | { return unique_ptr<_Tp>(new _Tp(std::forward<_Args>(__args)...)); }
| ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/gha/actions-runner/_work/llvm-project/llvm-project/lldb/source/Plugins/Instruction/MIPS64/EmulateInstructionMIPS64.cpp:164:20: note: in instantiation of function template specialization 'std::make_unique<llvm::MCContext, llvm::Triple &, llvm::MCAsmInfo *, llvm::MCRegisterInfo *, llvm::MCSubtargetInfo *>' requested here
164 | m_context = std::make_unique<llvm::MCContext>(
| ^
/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include/llvm/MC/MCContext.h:379:21: note: candidate constructor not viable: no known conversion from 'llvm::MCAsmInfo *' to 'const MCAsmInfo' for 2nd argument; dereference the argument with *
379 | LLVM_ABI explicit MCContext(const Triple &TheTriple, const MCAsmInfo &MAI,
| ^ ~~~~~~~~~~~~~~~~~~~~
/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include/llvm/MC/MCContext.h:385:3: note: candidate constructor not viable: requires 1 argument, but 4 were provided
385 | MCContext(const MCContext &) = delete;
| ^ ~~~~~~~~~~~~~~~~~
1 error generated.
```
</details>
<details>
<summary>tools/lldb/source/Plugins/Instruction/MIPS/CMakeFiles/lldbPluginInstructionMIPS.dir/EmulateInstructionMIPS.cpp.o</summary>
```
FAILED: tools/lldb/source/Plugins/Instruction/MIPS/CMakeFiles/lldbPluginInstructionMIPS.dir/EmulateInstructionMIPS.cpp.o
sccache /opt/llvm/bin/clang++ -DHAVE_ROUND -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GLIBCXX_USE_CXX11_ABI=1 -D_GNU_SOURCE -D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_EXTENSIVE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/lldb/source/Plugins/Instruction/MIPS -I/home/gha/actions-runner/_work/llvm-project/llvm-project/lldb/source/Plugins/Instruction/MIPS -I/home/gha/actions-runner/_work/llvm-project/llvm-project/lldb/include -I/home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/lldb/include -I/home/gha/actions-runner/_work/llvm-project/llvm-project/build/include -I/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include -I/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/../clang/include -I/home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/lldb/../clang/include -I/home/gha/actions-runner/_work/llvm-project/llvm-project/lldb/source -I/home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/lldb/source -gmlt -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wno-pass-failed -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -Wno-unknown-pragmas -Wno-strict-aliasing -Wno-vla-extension -O3 -DNDEBUG -std=c++17 -UNDEBUG -fno-exceptions -funwind-tables -fno-rtti -MD -MT tools/lldb/source/Plugins/Instruction/MIPS/CMakeFiles/lldbPluginInstructionMIPS.dir/EmulateInstructionMIPS.cpp.o -MF tools/lldb/source/Plugins/Instruction/MIPS/CMakeFiles/lldbPluginInstructionMIPS.dir/EmulateInstructionMIPS.cpp.o.d -o tools/lldb/source/Plugins/Instruction/MIPS/CMakeFiles/lldbPluginInstructionMIPS.dir/EmulateInstructionMIPS.cpp.o -c /home/gha/actions-runner/_work/llvm-project/llvm-project/lldb/source/Plugins/Instruction/MIPS/EmulateInstructionMIPS.cpp
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/lldb/source/Plugins/Instruction/MIPS/EmulateInstructionMIPS.cpp:9:
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/lldb/source/Plugins/Instruction/MIPS/EmulateInstructionMIPS.h:13:
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include/llvm/MC/MCTargetOptions.h:12:
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include/llvm/ADT/ArrayRef.h:13:
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include/llvm/ADT/STLExtras.h:37:
In file included from /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/memory:78:
/usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/unique_ptr.h:1070:34: error: no matching constructor for initialization of 'llvm::MCContext'
1070 | { return unique_ptr<_Tp>(new _Tp(std::forward<_Args>(__args)...)); }
| ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/gha/actions-runner/_work/llvm-project/llvm-project/lldb/source/Plugins/Instruction/MIPS/EmulateInstructionMIPS.cpp:160:20: note: in instantiation of function template specialization 'std::make_unique<llvm::MCContext, llvm::Triple &, llvm::MCAsmInfo *, llvm::MCRegisterInfo *, llvm::MCSubtargetInfo *>' requested here
160 | m_context = std::make_unique<llvm::MCContext>(
| ^
/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include/llvm/MC/MCContext.h:379:21: note: candidate constructor not viable: no known conversion from 'llvm::MCAsmInfo *' to 'const MCAsmInfo' for 2nd argument; dereference the argument with *
379 | LLVM_ABI explicit MCContext(const Triple &TheTriple, const MCAsmInfo &MAI,
| ^ ~~~~~~~~~~~~~~~~~~~~
/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include/llvm/MC/MCContext.h:385:3: note: candidate constructor not viable: requires 1 argument, but 4 were provided
385 | MCContext(const MCContext &) = delete;
| ^ ~~~~~~~~~~~~~~~~~
1 error generated.
```
</details>
<details>
<summary>tools/lldb/source/Plugins/Disassembler/LLVMC/CMakeFiles/lldbPluginDisassemblerLLVMC.dir/DisassemblerLLVMC.cpp.o</summary>
```
FAILED: tools/lldb/source/Plugins/Disassembler/LLVMC/CMakeFiles/lldbPluginDisassemblerLLVMC.dir/DisassemblerLLVMC.cpp.o
sccache /opt/llvm/bin/clang++ -DHAVE_ROUND -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GLIBCXX_USE_CXX11_ABI=1 -D_GNU_SOURCE -D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_EXTENSIVE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/lldb/source/Plugins/Disassembler/LLVMC -I/home/gha/actions-runner/_work/llvm-project/llvm-project/lldb/source/Plugins/Disassembler/LLVMC -I/home/gha/actions-runner/_work/llvm-project/llvm-project/lldb/include -I/home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/lldb/include -I/home/gha/actions-runner/_work/llvm-project/llvm-project/build/include -I/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include -I/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/../clang/include -I/home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/lldb/../clang/include -I/home/gha/actions-runner/_work/llvm-project/llvm-project/lldb/source -I/home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/lldb/source -gmlt -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wno-pass-failed -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -Wno-unknown-pragmas -Wno-strict-aliasing -Wno-vla-extension -O3 -DNDEBUG -std=c++17 -UNDEBUG -fno-exceptions -funwind-tables -fno-rtti -MD -MT tools/lldb/source/Plugins/Disassembler/LLVMC/CMakeFiles/lldbPluginDisassemblerLLVMC.dir/DisassemblerLLVMC.cpp.o -MF tools/lldb/source/Plugins/Disassembler/LLVMC/CMakeFiles/lldbPluginDisassemblerLLVMC.dir/DisassemblerLLVMC.cpp.o.d -o tools/lldb/source/Plugins/Disassembler/LLVMC/CMakeFiles/lldbPluginDisassemblerLLVMC.dir/DisassemblerLLVMC.cpp.o -c /home/gha/actions-runner/_work/llvm-project/llvm-project/lldb/source/Plugins/Disassembler/LLVMC/DisassemblerLLVMC.cpp
/home/gha/actions-runner/_work/llvm-project/llvm-project/lldb/source/Plugins/Disassembler/LLVMC/DisassemblerLLVMC.cpp:1287:11: error: no matching constructor for initialization of 'llvm::MCContext'
1287 | new llvm::MCContext(llvm::Triple(triple), asm_info_up.get(),
| ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1288 | reg_info_up.get(), subtarget_info_up.get()));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include/llvm/MC/MCContext.h:379:21: note: candidate constructor not viable: no known conversion from 'pointer' (aka 'llvm::MCAsmInfo *') to 'const MCAsmInfo' for 2nd argument; dereference the argument with *
379 | LLVM_ABI explicit MCContext(const Triple &TheTriple, const MCAsmInfo &MAI,
| ^ ~~~~~~~~~~~~~~~~~~~~
/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include/llvm/MC/MCContext.h:385:3: note: candidate constructor not viable: requires 1 argument, but 4 were provided
385 | MCContext(const MCContext &) = delete;
| ^ ~~~~~~~~~~~~~~~~~
1 error generated.
```
</details>
If these failures are unrelated to your changes (for example tests are broken or flaky at HEAD), please open an issue at https://github.com/llvm/llvm-project/issues and add the `infrastructure` label.
https://github.com/llvm/llvm-project/pull/194280
More information about the cfe-commits
mailing list