ΒΆtemplate <typename IRBuilderTy>
llvm::Value* EmitGEPOffset(
    IRBuilderTy* Builder,
    const llvm::DataLayout& DL,
    llvm::User* GEP,
    bool NoAssumptions = false)

Description

Given a getelementptr instruction/constantexpr, emit the code necessary to compute the offset from the base pointer (without adding in the base pointer). Return the result as a signed integer of intptr size. When NoAssumptions is true, no assumptions about index computation not overflowing is made.

Declared at: llvm/include/llvm/Analysis/Utils/Local.h:29

Templates

IRBuilderTy

Parameters

IRBuilderTy* Builder
const llvm::DataLayout& DL
llvm::User* GEP
bool NoAssumptions = false