llvm::TargetLoweringObjectFile::lowerRelativeReference

Lower a relative reference between two globals to a target MCExpr.

Synopsis

Declared in <llvm/Target/TargetLoweringObjectFile.h>

virtual
MCExpr const*
lowerRelativeReference(
    GlobalValue const* LHS,
    GlobalValue const* RHS,
    int64_t Addend,
    std::optional<int64_t> PCRelativeOffset,
    TargetMachine const& TM) const;

Return Value

The lowered MCExpr, or nullptr if unsupported.

Parameters

NameDescription
LHSLeft-hand global value of the relative reference.
RHSRight-hand global value of the relative reference.
AddendConstant addend applied to the reference.
PCRelativeOffsetOptional PC-relative offset, if applicable.
TMTarget machine whose relocation conventions apply.