Manage lifetime of a slot tracker for printing IR.

Synopsis

Declared in <llvm/IR/ModuleSlotTracker.h>

class ModuleSlotTracker;

Description

Wrapper around the SlotTracker used internally by AsmWriter. This class allows callers to share the cost of incorporating the metadata in a module or a function.

If the IR changes from underneath ModuleSlotTracker, strings like "<badref>" will be printed, or, worse, the wrong slots entirely.

Type Aliases

Name

Description

MachineMDNodeListType

List of metadata nodes paired with their assigned slot numbers.

Member Functions

Name

Description

ModuleSlotTracker [constructor]

Constructors

~ModuleSlotTracker [destructor] [virtual]

Destructor to clean up storage.

collectMDNodes

Collect metadata nodes whose slots fall in []`LB,` UB).

getCurrentFunction

Return the function currently incorporated into the slot tracker.

getLocalSlot

Return the slot number of the specified local value.

getMachine

Lazily creates a slot tracker.

getModule

Return the module whose slots are being tracked.

incorporateFunction

Incorporate the given function.

setProcessHook

setProcessHook overloads

Derived Classes

Name

Description

MachineModuleSlotTracker

Module slot tracker that also numbers MachineFunction metadata.

Created with MrDocs