LLVM API Documentation
#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"
Go to the source code of this file.
Functions | |
static Value * | getField (const MDNode *DbgNode, unsigned Elt) |
static MDNode * | getNodeField (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) |
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] |
fixupSubprogramName - Replace contains special characters used in a typical Objective-C names with '.' in a given string.
Definition at line 877 of file DebugInfo.cpp.
References llvm::SmallVectorImpl< T >::append(), llvm::StringRef::begin(), llvm::CallingConv::C, llvm::StringRef::end(), llvm::DISubprogram::getFunction(), llvm::Value::getName(), llvm::DISubprogram::getName(), llvm::GlobalValue::getRealLinkageName(), llvm::cl::Prefix, llvm::SmallVectorTemplateBase< T, isPodLike >::push_back(), llvm::SmallVectorImpl< T >::reserve(), and llvm::StringRef::size().
Referenced by llvm::getFnSpecificMDNode(), and llvm::getOrInsertFnSpecificMDNode().
Definition at line 55 of file DebugInfo.cpp.
References llvm::MDNode::getNumOperands(), and llvm::MDNode::getOperand().
Referenced by fieldIsMDNode(), fieldIsMDString(), fieldIsScopeRef(), fieldIsTypeRef(), llvm::DICompositeType::getIdentifier(), getNodeField(), getStringField(), and llvm::DITemplateValueParameter::getValue().
static MDNode* getNodeField | ( | const MDNode * | DbgNode, |
unsigned | Elt | ||
) | [static] |
Definition at line 61 of file DebugInfo.cpp.
References getField().
Referenced by llvm::DIDescriptor::getDescriptorField(), llvm::DIScope::getDirectory(), llvm::DICompileUnit::getEnumTypes(), llvm::DIScope::getFilename(), llvm::DIFile::getFileNode(), llvm::DICompileUnit::getGlobalVariables(), llvm::DICompileUnit::getImportedEntities(), llvm::DIVariable::getInlinedAt(), llvm::DIDerivedType::getObjCProperty(), llvm::DICompileUnit::getRetainedTypes(), llvm::DICompileUnit::getSubprograms(), llvm::DISubprogram::getVariables(), and llvm::DISubprogram::getVariablesNodes().
static StringRef getStringField | ( | const MDNode * | DbgNode, |
unsigned | Elt | ||
) | [static] |
Definition at line 65 of file DebugInfo.cpp.
References getField().
Referenced by llvm::DIScope::getDirectory(), llvm::DIScope::getFilename(), and llvm::DIDescriptor::getStringField().
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().
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] |
Definition at line 1460 of file DebugInfo.cpp.
References llvm::DebugLoc::getCol(), llvm::DIScope::getFilename(), llvm::DebugLoc::getFromDILocation(), llvm::DebugLoc::getInlinedAt(), llvm::DebugLoc::getLine(), llvm::DebugLoc::getScope(), llvm::DIDescriptor::isScope(), and llvm::DebugLoc::isUnknown().
Referenced by llvm::DIVariable::printExtendedName().
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().