LLVM 22.0.0git
DIBuilder.cpp File Reference
#include "llvm/IR/DIBuilder.h"
#include "LLVMContextImpl.h"
#include "llvm/ADT/APInt.h"
#include "llvm/ADT/APSInt.h"
#include "llvm/BinaryFormat/Dwarf.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/DebugInfo.h"
#include "llvm/IR/IRBuilder.h"
#include "llvm/IR/Module.h"
#include <optional>

Go to the source code of this file.

Functions

static DIScopegetNonCompileUnitScope (DIScope *N)
 If N is compile unit return NULL otherwise return N.
static DIImportedEntitycreateImportedModule (LLVMContext &C, dwarf::Tag Tag, DIScope *Context, Metadata *NS, DIFile *File, unsigned Line, StringRef Name, DINodeArray Elements, SmallVectorImpl< TrackingMDNodeRef > &ImportedModules)
static ConstantAsMetadatagetConstantOrNull (Constant *C)
static DITemplateValueParametercreateTemplateValueParameterHelper (LLVMContext &VMContext, unsigned Tag, DIScope *Context, StringRef Name, DIType *Ty, bool IsDefault, Metadata *MD)
static DITypecreateTypeWithFlags (const DIType *Ty, DINode::DIFlags FlagsToSet)
static void checkGlobalVariableScope (DIScope *Context)
static DILocalVariablecreateLocalVariable (LLVMContext &VMContext, SmallVectorImpl< TrackingMDNodeRef > &PreservedNodes, DIScope *Context, StringRef Name, unsigned ArgNo, DIFile *File, unsigned LineNo, DIType *Ty, bool AlwaysPreserve, DINode::DIFlags Flags, uint32_t AlignInBits, DINodeArray Annotations=nullptr)
template<class... Ts>
static DISubprogramgetSubprogram (bool IsDistinct, Ts &&...Args)
static void initIRBuilder (IRBuilder<> &Builder, const DILocation *DL, InsertPosition InsertPt)
 Initialize IRBuilder for inserting dbg.declare and dbg.value intrinsics.
static ValuegetDbgIntrinsicValueImpl (LLVMContext &VMContext, Value *V)

Function Documentation

◆ checkGlobalVariableScope()

void checkGlobalVariableScope ( DIScope * Context)
static

◆ createImportedModule()

◆ createLocalVariable()

DILocalVariable * createLocalVariable ( LLVMContext & VMContext,
SmallVectorImpl< TrackingMDNodeRef > & PreservedNodes,
DIScope * Context,
StringRef Name,
unsigned ArgNo,
DIFile * File,
unsigned LineNo,
DIType * Ty,
bool AlwaysPreserve,
DINode::DIFlags Flags,
uint32_t AlignInBits,
DINodeArray Annotations = nullptr )
static

◆ createTemplateValueParameterHelper()

DITemplateValueParameter * createTemplateValueParameterHelper ( LLVMContext & VMContext,
unsigned Tag,
DIScope * Context,
StringRef Name,
DIType * Ty,
bool IsDefault,
Metadata * MD )
static

◆ createTypeWithFlags()

◆ getConstantOrNull()

◆ getDbgIntrinsicValueImpl()

Value * getDbgIntrinsicValueImpl ( LLVMContext & VMContext,
Value * V )
static

◆ getNonCompileUnitScope()

◆ getSubprogram()

◆ initIRBuilder()

void initIRBuilder ( IRBuilder<> & Builder,
const DILocation * DL,
InsertPosition InsertPt )
static

Initialize IRBuilder for inserting dbg.declare and dbg.value intrinsics.

This abstracts over the various ways to specify an insert position.

Definition at line 1106 of file DIBuilder.cpp.

References DL, and llvm::InsertPosition::getBasicBlock().