[all-commits] [llvm/llvm-project] 77d103: [llvm] Add assembly color highlighting

Jonas Devlieghere via All-commits all-commits at lists.llvm.org
Fri Sep 1 07:58:02 PDT 2023

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 77d1032516e7057f185c5137071e4a97c3f3eb30
  Author: Jonas Devlieghere <jonas at devlieghere.com>
  Date:   2023-09-01 (Fri, 01 Sep 2023)

  Changed paths:
    M llvm/docs/CommandGuide/llvm-mc.rst
    M llvm/include/llvm/MC/MCInstPrinter.h
    M llvm/lib/MC/MCInstPrinter.cpp
    M llvm/lib/Target/AArch64/MCTargetDesc/AArch64InstPrinter.cpp
    M llvm/lib/Target/AArch64/MCTargetDesc/AArch64InstPrinter.h
    A llvm/test/MC/Disassembler/AArch64/colored.txt
    M llvm/tools/llvm-mc/llvm-mc.cpp

  Log Message:
  [llvm] Add assembly color highlighting

Add support for syntax highlighting assembly. The patch introduces new
RAII helper called WithMarkup that takes care of both emitting colors
and markup annotations. It makes adding markup easier and ensures colors
and annotations remain consistent.

This patch adopts the new helper in the AArch64 backend. If your backend
already uses markup annotations, adoption is as easy as using the new
MCInstPrinter::markup overload.

Differential revision: https://reviews.llvm.org/D159162

More information about the All-commits mailing list