[all-commits] [llvm/llvm-project] bbd0d1: Implement -frecord-command-line for XCOFF

Jake Egan via All-commits all-commits at lists.llvm.org
Mon Jul 10 09:47:24 PDT 2023

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: bbd0d123d3aaa67d8bed9d16d9001b33540fc04d
  Author: Jake Egan <5326451+jakeegan at users.noreply.github.com>
  Date:   2023-07-10 (Mon, 10 Jul 2023)

  Changed paths:
    M clang/lib/Driver/ToolChains/Clang.cpp
    M llvm/include/llvm/CodeGen/AsmPrinter.h
    M llvm/include/llvm/MC/MCStreamer.h
    M llvm/include/llvm/MC/MCXCOFFStreamer.h
    M llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
    M llvm/lib/MC/MCAsmStreamer.cpp
    M llvm/lib/MC/MCStreamer.cpp
    M llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
    A llvm/test/CodeGen/PowerPC/aix-command-line-metadata.ll

  Log Message:
  Implement -frecord-command-line for XCOFF

This patch extends support of the option `-frecord-command-line` to XCOFF. XCOFF doesn’t have custom sections like ELF, so the command line data is emitted to a .info section instead. A C_INFO symbol is generated with the .info section to preserve the command line data past the link step. Multiple command lines are separated by newlines and null bytes. The command line data can be retrieved on AIX with command `what file_name`.

Reviewed By: scott.linder

Differential Revision: https://reviews.llvm.org/D153600

More information about the All-commits mailing list