LLVM 23.0.0git
llvm::ParserCallbacks Struct Reference

#include "llvm/Bitcode/BitcodeReader.h"

Public Member Functions

 ParserCallbacks ()=default
 ParserCallbacks (DataLayoutCallbackFuncTy DataLayout)

Public Attributes

std::optional< DataLayoutCallbackFuncTyDataLayout
std::optional< ValueTypeCallbackTyValueType
 The ValueType callback is called for every function definition or declaration and allows accessing the type information, also behind pointers.
std::optional< MDTypeCallbackTyMDType
 The MDType callback is called for every value in metadata.
bool SkipDebugIntrinsicUpgrade = false
 If true, do not auto-upgrade debug intrinsic calls (llvm.dbg.

Detailed Description

Definition at line 74 of file BitcodeReader.h.

Constructor & Destructor Documentation

◆ ParserCallbacks() [1/2]

llvm::ParserCallbacks::ParserCallbacks ( )
default

◆ ParserCallbacks() [2/2]

llvm::ParserCallbacks::ParserCallbacks ( DataLayoutCallbackFuncTy DataLayout)
inlineexplicit

Definition at line 96 of file BitcodeReader.h.

References DataLayout.

Member Data Documentation

◆ DataLayout

std::optional<DataLayoutCallbackFuncTy> llvm::ParserCallbacks::DataLayout

Definition at line 75 of file BitcodeReader.h.

Referenced by llvm::parseIR(), and ParserCallbacks().

◆ MDType

std::optional<MDTypeCallbackTy> llvm::ParserCallbacks::MDType

The MDType callback is called for every value in metadata.

Definition at line 85 of file BitcodeReader.h.

◆ SkipDebugIntrinsicUpgrade

bool llvm::ParserCallbacks::SkipDebugIntrinsicUpgrade = false

If true, do not auto-upgrade debug intrinsic calls (llvm.dbg.

*) to non-instruction debug records during bitcode read. This flag allows direct manipulation of the old intrinsic-form debug info; beware that LLVM does not support using these intrinsics any more. The caller is responsible for performing the upgrade manually (e.g. via Module::convertToNewDbgValues()).

Definition at line 93 of file BitcodeReader.h.

◆ ValueType

std::optional<ValueTypeCallbackTy> llvm::ParserCallbacks::ValueType

The ValueType callback is called for every function definition or declaration and allows accessing the type information, also behind pointers.

This can be useful, when the opaque pointer upgrade cleans all type information behind pointers. The second argument to ValueTypeCallback is the type ID of the function, the two passed functions can be used to extract type information.

Definition at line 83 of file BitcodeReader.h.


The documentation for this struct was generated from the following file: