make the AsmPrinterHandler array public
authorJameson Nash <vtjnash@gmail.com>
Tue, 3 Nov 2020 13:54:51 +0000 (08:54 -0500)
committerJameson Nash <vtjnash@gmail.com>
Tue, 3 Nov 2020 15:02:09 +0000 (10:02 -0500)
commita0ad066ce490ba34f259dd0fc8ad5810bd92dc3d
treed600989a4f78fdb5e39366b3017387060be11d88
parent97e8da45f9459ce9334c2d387ada7d2cde9625f4
make the AsmPrinterHandler array public

This lets external consumers customize the output, similar to how
AssemblyAnnotationWriter lets the caller define callbacks when printing
IR. The array of handlers already existed, this just cleans up the code
so that it can be exposed publically.

Replaces https://reviews.llvm.org/D74158

Differential Revision: https://reviews.llvm.org/D89613
12 files changed:
llvm/include/llvm/CodeGen/AsmPrinter.h
llvm/include/llvm/CodeGen/AsmPrinterHandler.h
llvm/include/llvm/CodeGen/DebugHandlerBase.h
llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.h
llvm/lib/CodeGen/AsmPrinter/DebugHandlerBase.cpp
llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h
llvm/lib/Target/BPF/BTFDebug.cpp
llvm/unittests/CodeGen/AsmPrinterDwarfTest.cpp
llvm/unittests/CodeGen/TestAsmPrinter.h