ΒΆbool IsConstantOffsetFromGlobal(
    llvm::Constant* C,
    llvm::GlobalValue*& GV,
    llvm::APInt& Offset,
    const llvm::DataLayout& DL,
    llvm::DSOLocalEquivalent** DSOEquiv = nullptr)

Description

If this constant is a constant offset from a global, return the global and the constant. Because of constantexprs, this function is recursive. If the global is part of a dso_local_equivalent constant, return it through `Equiv` if it is provided.

Declared at: llvm/include/llvm/Analysis/ConstantFolding.h:42

Parameters

llvm::Constant* C
llvm::GlobalValue*& GV
llvm::APInt& Offset
const llvm::DataLayout& DL
llvm::DSOLocalEquivalent** DSOEquiv = nullptr