LLVM API Documentation

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Functions
DebugInfo.cpp File Reference
#include "llvm/DebugInfo.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/DerivedTypes.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/IntrinsicInst.h"
#include "llvm/IR/Intrinsics.h"
#include "llvm/IR/Module.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/Dwarf.h"
#include "llvm/Support/ValueHandle.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. More...
 
static bool isTypeRef (const Value *Val)
 Check if a value can be a reference to a type. More...
 
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. More...
 
static bool isScopeRef (const Value *Val)
 Check if a value can be a ScopeRef. More...
 
static bool fieldIsScopeRef (const MDNode *DbgNode, unsigned Elt)
 Check if a field at position Elt of a MDNode can be a ScopeRef. More...
 
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 399 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 409 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 435 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 422 of file DebugInfo.cpp.

References getField(), and isTypeRef().

Referenced by llvm::DIDerivedType::Verify(), llvm::DICompositeType::Verify(), and llvm::DISubprogram::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 428 of file DebugInfo.cpp.

References llvm::DIDescriptor::isScope().

Referenced by fieldIsScopeRef().

static bool isTypeRef ( const Value Val)
static

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

Definition at line 415 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