[all-commits] [llvm/llvm-project] a6aa93: [NFC][AsmPrinter] Pass MJTI by const reference ins...

Mingming Liu via All-commits all-commits at lists.llvm.org
Thu Jan 9 15:57:54 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a6aa9365f75c6f28c3d281c662dcdb6fb5222601
      https://github.com/llvm/llvm-project/commit/a6aa9365f75c6f28c3d281c662dcdb6fb5222601
  Author: Mingming Liu <mingmingl at google.com>
  Date:   2025-01-09 (Thu, 09 Jan 2025)

  Changed paths:
    M llvm/include/llvm/CodeGen/AsmPrinter.h
    M llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp

  Log Message:
  -----------
  [NFC][AsmPrinter] Pass MJTI by const reference instead of const pointer (#122365)

The caller `AsmPrinter::emitJumpTableInfo` checks [1] `MJTI` is not a
null pointer before calling `emitJumpTableEntry` or
`emitJumpTableSizesSection`.

This patch updates callee function's signature to accept const
reference, this way it's explicit `MJTI` won't be nullptr inside the
callee.

[1]
https://github.com/llvm/llvm-project/blob/9d5299eb61a64cd4df5fefa0299b0cf8d917978f/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp#L2857



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