[all-commits] [llvm/llvm-project] 13e98d: [MC] Take MCAsmInfo by reference in MCContext and ...

Fangrui Song via All-commits all-commits at lists.llvm.org
Mon Apr 27 00:49:17 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 13e98d834101efd1794cdd026377c508293ee21b
      https://github.com/llvm/llvm-project/commit/13e98d834101efd1794cdd026377c508293ee21b
  Author: Fangrui Song <i at maskray.me>
  Date:   2026-04-27 (Mon, 27 Apr 2026)

  Changed paths:
    M bolt/include/bolt/Core/BinaryContext.h
    M bolt/lib/Core/BinaryContext.cpp
    M clang/lib/Parse/ParseStmtAsm.cpp
    M clang/tools/driver/cc1as_main.cpp
    M lldb/source/Plugins/Disassembler/LLVMC/DisassemblerLLVMC.cpp
    M lldb/source/Plugins/Instruction/MIPS/EmulateInstructionMIPS.cpp
    M lldb/source/Plugins/Instruction/MIPS64/EmulateInstructionMIPS64.cpp
    M llvm/include/llvm/MC/MCContext.h
    M llvm/include/llvm/Passes/CodeGenPassBuilder.h
    M llvm/include/llvm/Target/TargetMachine.h
    M llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
    M llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp
    M llvm/lib/CodeGen/CodeGenTargetMachineImpl.cpp
    M llvm/lib/CodeGen/MachineVerifier.cpp
    M llvm/lib/CodeGen/ShrinkWrap.cpp
    M llvm/lib/CodeGen/TargetFrameLoweringImpl.cpp
    M llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
    M llvm/lib/CodeGen/TargetPassConfig.cpp
    M llvm/lib/DWARFLinker/Classic/DWARFStreamer.cpp
    M llvm/lib/DWARFLinker/Parallel/DWARFEmitterImpl.cpp
    M llvm/lib/DWARFLinker/Parallel/DebugLineSectionEmitter.h
    M llvm/lib/DebugInfo/LogicalView/Readers/LVBinaryReader.cpp
    M llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldChecker.cpp
    M llvm/lib/MC/MCContext.cpp
    M llvm/lib/MC/MCDisassembler/Disassembler.cpp
    M llvm/lib/Object/ModuleSymbolTable.cpp
    M llvm/lib/Target/AArch64/AArch64FrameLowering.cpp
    M llvm/lib/Target/AArch64/AArch64InstrInfo.cpp
    M llvm/lib/Target/AArch64/AArch64LoadStoreOptimizer.cpp
    M llvm/lib/Target/AArch64/AArch64MachineFunctionInfo.cpp
    M llvm/lib/Target/AArch64/AArch64TargetMachine.cpp
    M llvm/lib/Target/AMDGPU/AMDGPUMCInstLower.cpp
    M llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
    M llvm/lib/Target/ARC/ARCInstrInfo.cpp
    M llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp
    M llvm/lib/Target/ARM/ARMExpandPseudoInsts.cpp
    M llvm/lib/Target/ARM/ARMFrameLowering.cpp
    M llvm/lib/Target/ARM/ARMSubtarget.cpp
    M llvm/lib/Target/ARM/ARMTargetObjectFile.cpp
    M llvm/lib/Target/ARM/Thumb2SizeReduction.cpp
    M llvm/lib/Target/AVR/AVRInstrInfo.cpp
    M llvm/lib/Target/CSKY/CSKYInstrInfo.cpp
    M llvm/lib/Target/Hexagon/HexagonInstrInfo.cpp
    M llvm/lib/Target/LoongArch/LoongArchInstrInfo.cpp
    M llvm/lib/Target/M68k/M68kMCInstLower.cpp
    M llvm/lib/Target/MSP430/MSP430InstrInfo.cpp
    M llvm/lib/Target/Mips/MipsInstrInfo.cpp
    M llvm/lib/Target/PowerPC/PPCInstrInfo.cpp
    M llvm/lib/Target/RISCV/RISCVInstrInfo.cpp
    M llvm/lib/Target/Sparc/SparcInstrInfo.cpp
    M llvm/lib/Target/SystemZ/SystemZInstrInfo.cpp
    M llvm/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp
    M llvm/lib/Target/WebAssembly/WebAssemblyExceptionInfo.cpp
    M llvm/lib/Target/WebAssembly/WebAssemblyFrameLowering.cpp
    M llvm/lib/Target/WebAssembly/WebAssemblyLateEHPrepare.cpp
    M llvm/lib/Target/X86/X86CodeGenPassBuilder.cpp
    M llvm/lib/Target/X86/X86FastISel.cpp
    M llvm/lib/Target/X86/X86FrameLowering.cpp
    M llvm/lib/Target/X86/X86ISelLowering.cpp
    M llvm/lib/Target/X86/X86InstrInfo.cpp
    M llvm/lib/Target/X86/X86MCInstLower.cpp
    M llvm/lib/Target/X86/X86TargetMachine.cpp
    M llvm/lib/Target/Xtensa/XtensaInstrInfo.cpp
    M llvm/tools/llvm-cfi-verify/lib/FileAnalysis.cpp
    M llvm/tools/llvm-dwp/llvm-dwp.cpp
    M llvm/tools/llvm-exegesis/lib/DisassemblerHelper.cpp
    M llvm/tools/llvm-exegesis/lib/SnippetFile.cpp
    M llvm/tools/llvm-jitlink/llvm-jitlink.cpp
    M llvm/tools/llvm-mc-assemble-fuzzer/llvm-mc-assemble-fuzzer.cpp
    M llvm/tools/llvm-mc/llvm-mc.cpp
    M llvm/tools/llvm-mca/llvm-mca.cpp
    M llvm/tools/llvm-ml/Disassembler.cpp
    M llvm/tools/llvm-ml/llvm-ml.cpp
    M llvm/tools/llvm-objdump/MachODump.cpp
    M llvm/tools/llvm-objdump/llvm-objdump.cpp
    M llvm/tools/llvm-profgen/ProfiledBinary.cpp
    M llvm/tools/llvm-rtdyld/llvm-rtdyld.cpp
    M llvm/tools/sancov/sancov.cpp
    M llvm/unittests/CodeGen/MachineInstrTest.cpp
    M llvm/unittests/CodeGen/MachineOperandTest.cpp
    M llvm/unittests/DebugInfo/DWARF/DWARFExpressionCopyBytesTest.cpp
    M llvm/unittests/DebugInfo/DWARF/DwarfGenerator.cpp
    M llvm/unittests/MC/AMDGPU/Disassembler.cpp
    M llvm/unittests/MC/DwarfDebugFrameCIE.cpp
    M llvm/unittests/MC/DwarfLineTableHeaders.cpp
    M llvm/unittests/MC/DwarfLineTables.cpp
    M llvm/unittests/MC/SystemZ/SystemZAsmLexerTest.cpp
    M llvm/unittests/MC/SystemZ/SystemZMCDisassemblerTest.cpp
    M llvm/unittests/MC/X86/X86MCDisassemblerTest.cpp
    M llvm/unittests/Target/AArch64/AArch64InstPrinterTest.cpp
    M llvm/unittests/tools/llvm-mca/MCATestBase.cpp
    M mlir/lib/Target/LLVM/ROCDL/Target.cpp

  Log Message:
  -----------
  [MC] Take MCAsmInfo by reference in MCContext and TargetMachine. NFC (#194280)

Both MCContext::MCContext and TargetMachine::getMCAsmInfo treat
MCAsmInfo as a pointer that must be non-null. Make the contract
explicit:

* MCContext's constructor takes `const MCAsmInfo &MAI`.
* TargetMachine::getMCAsmInfo returns `const MCAsmInfo &`.

Make this change now since the MCContext ctor has recently been updated.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list