[PATCH] D110112: [IR]PATCH 1/2: Add AsmWriterContext into AsmWriter

Min-Yih Hsu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 20 16:25:02 PDT 2021


myhsu created this revision.
myhsu added reviewers: aprantl, Orlando.
Herald added subscribers: dexonsmith, hiraditya.
myhsu requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

AsmWriterContext is a simple compound that stores TypePrinting, SlotTracker (i.e. "Machine" in AsmWriter), and Module instances -- three of the most commonly used objects in the AsmWriter infrastructure. Previously these three objects are passed as separate function arguments to most of the printer functions in this file. Tidying them up can bring easier code refactoring on printer functions in the future (e.g. when we want to pass additional objects to all printer functions).

This patch is used to prepare the next patch in this series, which tries to print MDNode in tree shape.

      

NOTE: Theoretically, this patch should be NFC.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D110112

Files:
  llvm/lib/IR/AsmWriter.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D110112.373740.patch
Type: text/x-patch
Size: 38459 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210920/825d2488/attachment.bin>


More information about the llvm-commits mailing list