LLVM API Documentation

Functions
DebugInfo.cpp File Reference
#include "llvm/IR/DebugInfo.h"
#include "LLVMContextImpl.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/Analysis/ValueTracking.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/DIBuilder.h"
#include "llvm/IR/DerivedTypes.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/IntrinsicInst.h"
#include "llvm/IR/Intrinsics.h"
#include "llvm/IR/Module.h"
#include "llvm/IR/ValueHandle.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/Dwarf.h"
#include "llvm/Support/raw_ostream.h"
Include dependency graph for DebugInfo.cpp:

Go to the source code of this file.

Functions

static ValuegetField (const MDNode *DbgNode, unsigned Elt)
static MDNodegetNodeField (const MDNode *DbgNode, unsigned Elt)
static StringRef getStringField (const MDNode *DbgNode, unsigned Elt)
static bool fieldIsMDNode (const MDNode *DbgNode, unsigned Elt)
static bool fieldIsMDString (const MDNode *DbgNode, unsigned Elt)
 Check if a field at position Elt of a MDNode is a MDString.
static bool isTypeRef (const Value *Val)
 Check if a value can be a reference to a type.
static bool fieldIsTypeRef (const MDNode *DbgNode, unsigned Elt)
 Check if a field at position Elt of a MDNode can be a reference to a type.
static bool isScopeRef (const Value *Val)
 Check if a value can be a ScopeRef.
static bool fieldIsScopeRef (const MDNode *DbgNode, unsigned Elt)
 Check if a field at position Elt of a MDNode can be a ScopeRef.
static void VerifySubsetOf (const MDNode *LHS, const MDNode *RHS)
static void fixupSubprogramName (DISubprogram Fn, SmallVectorImpl< char > &Out)
static void printDebugLoc (DebugLoc DL, raw_ostream &CommentOS, const LLVMContext &Ctx)

Function Documentation

static bool fieldIsMDNode ( const MDNode DbgNode,
unsigned  Elt 
) [static]

Check if a field at position Elt of a MDNode is a MDNode. We currently allow an empty string and an integer. But we don't allow a non-empty string in a MDNode field.

Definition at line 428 of file DebugInfo.cpp.

References getField().

Referenced by llvm::DISubprogram::Verify(), llvm::DIGlobalVariable::Verify(), and llvm::DIVariable::Verify().

static bool fieldIsMDString ( const MDNode DbgNode,
unsigned  Elt 
) [static]

Check if a field at position Elt of a MDNode is a MDString.

Definition at line 438 of file DebugInfo.cpp.

References getField().

Referenced by llvm::DICompositeType::Verify().

static bool fieldIsScopeRef ( const MDNode DbgNode,
unsigned  Elt 
) [static]

Check if a field at position Elt of a MDNode can be a ScopeRef.

Definition at line 466 of file DebugInfo.cpp.

References getField(), and isScopeRef().

Referenced by llvm::DIType::Verify(), and llvm::DISubprogram::Verify().

static bool fieldIsTypeRef ( const MDNode DbgNode,
unsigned  Elt 
) [static]

Check if a field at position Elt of a MDNode can be a reference to a type.

Definition at line 451 of file DebugInfo.cpp.

References getField(), and isTypeRef().

Referenced by llvm::DIDerivedType::Verify(), llvm::DICompositeType::Verify(), llvm::DISubprogram::Verify(), llvm::DIGlobalVariable::Verify(), and llvm::DIVariable::Verify().

static void fixupSubprogramName ( DISubprogram  Fn,
SmallVectorImpl< char > &  Out 
) [static]
static Value* getField ( const MDNode DbgNode,
unsigned  Elt 
) [static]
static MDNode* getNodeField ( const MDNode DbgNode,
unsigned  Elt 
) [static]
static StringRef getStringField ( const MDNode DbgNode,
unsigned  Elt 
) [static]
static bool isScopeRef ( const Value Val) [static]

Check if a value can be a ScopeRef.

Definition at line 457 of file DebugInfo.cpp.

Referenced by fieldIsScopeRef().

static bool isTypeRef ( const Value Val) [static]

Check if a value can be a reference to a type.

Definition at line 444 of file DebugInfo.cpp.

References llvm::DIDescriptor::isType().

Referenced by fieldIsTypeRef().

static void printDebugLoc ( DebugLoc  DL,
raw_ostream CommentOS,
const LLVMContext Ctx 
) [static]
static void VerifySubsetOf ( const MDNode LHS,
const MDNode RHS 
) [static]

Definition at line 676 of file DebugInfo.cpp.

References llvm::MDNode::getNumOperands(), and llvm::MDNode::getOperand().