31 using namespace llvm::dwarf;
60 return dyn_cast_or_null<MDNode>(
getField(DbgNode, Elt));
65 return MDS->getString();
77 if (Elt < DbgNode->getNumOperands())
79 dyn_cast_or_null<ConstantInt>(DbgNode->getOperand(Elt)))
80 return CI->getZExtValue();
89 if (Elt < DbgNode->getNumOperands())
91 dyn_cast_or_null<ConstantInt>(DbgNode->getOperand(Elt)))
92 return CI->getSExtValue();
106 if (Elt < DbgNode->getNumOperands())
107 return dyn_cast_or_null<GlobalVariable>(DbgNode->getOperand(Elt));
115 if (Elt < DbgNode->getNumOperands())
116 return dyn_cast_or_null<Constant>(DbgNode->getOperand(Elt));
124 if (Elt < DbgNode->getNumOperands())
125 return dyn_cast_or_null<Function>(DbgNode->getOperand(Elt));
133 if (Elt < DbgNode->getNumOperands()) {
140 return DbgNode->getNumOperands() - 8;
156 case dwarf::DW_TAG_base_type:
157 case dwarf::DW_TAG_unspecified_type:
169 case dwarf::DW_TAG_typedef:
170 case dwarf::DW_TAG_pointer_type:
171 case dwarf::DW_TAG_ptr_to_member_type:
172 case dwarf::DW_TAG_reference_type:
173 case dwarf::DW_TAG_rvalue_reference_type:
174 case dwarf::DW_TAG_const_type:
175 case dwarf::DW_TAG_volatile_type:
176 case dwarf::DW_TAG_restrict_type:
177 case dwarf::DW_TAG_member:
178 case dwarf::DW_TAG_inheritance:
179 case dwarf::DW_TAG_friend:
183 return isCompositeType();
193 case dwarf::DW_TAG_array_type:
194 case dwarf::DW_TAG_structure_type:
195 case dwarf::DW_TAG_union_type:
196 case dwarf::DW_TAG_enumeration_type:
197 case dwarf::DW_TAG_subroutine_type:
198 case dwarf::DW_TAG_class_type:
210 case dwarf::DW_TAG_auto_variable:
211 case dwarf::DW_TAG_arg_variable:
220 return isBasicType() || isCompositeType() || isDerivedType();
226 return DbgNode && getTag() == dwarf::DW_TAG_subprogram;
232 return DbgNode && (getTag() == dwarf::DW_TAG_variable ||
233 getTag() == dwarf::DW_TAG_constant);
239 return DbgNode && getTag() == dwarf::DW_TAG_unspecified_parameters;
248 case dwarf::DW_TAG_compile_unit:
249 case dwarf::DW_TAG_lexical_block:
250 case dwarf::DW_TAG_subprogram:
251 case dwarf::DW_TAG_namespace:
252 case dwarf::DW_TAG_file_type:
263 return DbgNode && getTag() == dwarf::DW_TAG_template_type_parameter;
269 return DbgNode && (getTag() == dwarf::DW_TAG_template_value_parameter ||
270 getTag() == dwarf::DW_TAG_GNU_template_template_param ||
271 getTag() == dwarf::DW_TAG_GNU_template_parameter_pack);
276 return DbgNode && getTag() == dwarf::DW_TAG_compile_unit;
281 return DbgNode && getTag() == dwarf::DW_TAG_file_type;
286 return DbgNode && getTag() == dwarf::DW_TAG_namespace;
292 return DbgNode && getTag() == dwarf::DW_TAG_lexical_block &&
293 (DbgNode->getNumOperands() == 3);
298 return DbgNode && getTag() == dwarf::DW_TAG_lexical_block &&
299 (DbgNode->getNumOperands() > 3);
304 return DbgNode && getTag() == dwarf::DW_TAG_subrange_type;
309 return DbgNode && getTag() == dwarf::DW_TAG_enumerator;
314 return DbgNode && getTag() == dwarf::DW_TAG_APPLE_property;
320 return DbgNode && (getTag() == dwarf::DW_TAG_imported_module ||
321 getTag() == dwarf::DW_TAG_imported_declaration);
331 return DbgNode->getNumOperands();
338 assert(DbgNode &&
"Trying to replace an unverified type!");
348 const Value *V = cast_or_null<Value>(DN);
358 assert(DbgNode &&
"Trying to replace an unverified type!");
368 const Value *V = cast_or_null<Value>(DN);
376 if (!isCompileUnit())
381 if (getFilename().empty())
384 return DbgNode->getNumOperands() == 13;
389 if (!isObjCProperty())
393 return DbgNode->getNumOperands() == 8;
403 if (Fld && isa<MDString>(Fld) && !cast<MDString>(Fld)->getString().empty())
411 return !Fld || isa<MDString>(Fld);
417 (isa<MDString>(Val) && !cast<MDString>(Val)->getString().empty()) ||
418 (isa<MDNode>(Val) &&
DIType(cast<MDNode>(Val)).
isType());
430 (isa<MDString>(Val) && !cast<MDString>(Val)->getString().empty()) ||
449 uint16_t Tag = getTag();
450 if (!isBasicType() && Tag != dwarf::DW_TAG_const_type &&
451 Tag != dwarf::DW_TAG_volatile_type && Tag != dwarf::DW_TAG_pointer_type &&
452 Tag != dwarf::DW_TAG_ptr_to_member_type &&
453 Tag != dwarf::DW_TAG_reference_type &&
454 Tag != dwarf::DW_TAG_rvalue_reference_type &&
455 Tag != dwarf::DW_TAG_restrict_type && Tag != dwarf::DW_TAG_array_type &&
456 Tag != dwarf::DW_TAG_enumeration_type &&
457 Tag != dwarf::DW_TAG_subroutine_type &&
458 Tag != dwarf::DW_TAG_inheritance && Tag != dwarf::DW_TAG_friend &&
459 getFilename().empty())
465 else if (isCompositeType())
467 else if (isDerivedType())
476 return isBasicType() && DbgNode->getNumOperands() == 10;
484 if (getTag() == dwarf::DW_TAG_ptr_to_member_type)
489 return isDerivedType() && DbgNode->getNumOperands() >= 10 &&
490 DbgNode->getNumOperands() <= 14;
495 if (!isCompositeType())
508 return DbgNode->getNumOperands() == 15;
524 return DbgNode->getNumOperands() == 20;
529 if (!isGlobalVariable())
532 if (getDisplayName().empty())
543 return DbgNode->getNumOperands() == 13;
556 return DbgNode->getNumOperands() >= 8;
564 return DbgNode->getNumOperands() == 4;
571 return DbgNode->getNumOperands() == 5;
579 return isFile() && DbgNode->getNumOperands() == 2;
584 return isEnumerator() && DbgNode->getNumOperands() == 3;
589 return isSubrange() && DbgNode->getNumOperands() == 3;
594 return isLexicalBlock() && DbgNode->getNumOperands() == 6;
599 return isLexicalBlockFile() && DbgNode->getNumOperands() == 3;
604 return isTemplateTypeParameter() && DbgNode->getNumOperands() == 7;
609 return isTemplateValueParameter() && DbgNode->getNumOperands() == 8;
614 return isImportedEntity() &&
615 (DbgNode->getNumOperands() == 4 || DbgNode->getNumOperands() == 5);
624 return cast_or_null<MDString>(
getField(DbgNode, 14));
631 if (i == 0 && isa<ConstantInt>(LHS->
getOperand(i)))
637 assert(found &&
"Losing a member during member list replacement");
644 assert((!TParams || DbgNode->getNumOperands() == 15) &&
645 "If you're setting the template parameters this should include a slot "
663 DIArray OrigM = getTypeArray();
668 for (
unsigned i = 0; i != Elements; ++i)
677 if (!isCompositeType())
695 assert(CurFn &&
"Invalid function");
696 if (!getContext().isSubprogram())
706 assert(F &&
"Invalid function");
707 if (F == getFunction())
718 assert(DbgNode &&
"Invalid subprogram descriptor!");
719 if (DbgNode->getNumOperands() == 15)
720 return getUnsignedField(14);
746 if (isLexicalBlock())
749 if (isLexicalBlockFile())
755 assert((isFile() || isCompileUnit()) &&
"Unhandled type of scope.");
767 assert((isLexicalBlock() || isLexicalBlockFile() || isFile() ||
769 "Unhandled type of scope.");
786 if (!DbgNode || DbgNode->getNumOperands() < 13)
793 if (!DbgNode || DbgNode->getNumOperands() < 13)
800 if (!DbgNode || DbgNode->getNumOperands() < 13)
807 if (!DbgNode || DbgNode->getNumOperands() < 13)
814 if (!DbgNode || DbgNode->getNumOperands() < 13)
831 bool isObjCLike =
false;
832 for (
size_t i = 0, e = FName.
size(); i < e; ++i) {
837 if (isObjCLike && (C ==
'[' || C ==
']' || C ==
' ' || C ==
':' ||
838 C ==
'+' || C ==
'(' || C ==
')'))
920 for (
unsigned CUi = 0, CUe = CU_Nodes->
getNumOperands(); CUi != CUe; ++CUi) {
922 DIArray Retain = CU.getRetainedTypes();
923 for (
unsigned Ti = 0, Te = Retain.getNumElements(); Ti != Te; ++Ti) {
924 if (!Retain.getElement(Ti).isCompositeType())
927 if (
MDString *TypeId = Ty.getIdentifier()) {
930 std::pair<DITypeIdentifierMap::iterator, bool>
P =
931 Map.
insert(std::make_pair(TypeId, Ty));
934 if (!P.second && !Ty.isForwardDecl())
935 P.first->second = Ty;
953 TypeIdentifierMap.clear();
954 TypeMapInitialized =
false;
957 void DebugInfoFinder::InitializeTypeMap(
const Module &M) {
958 if (!TypeMapInitialized)
961 TypeMapInitialized =
true;
967 InitializeTypeMap(M);
969 for (
unsigned i = 0, e = CU_Nodes->getNumOperands(); i != e; ++i) {
972 DIArray GVs = CU.getGlobalVariables();
975 if (addGlobalVariable(DIG)) {
976 processScope(DIG.getContext());
977 processType(DIG.getType());
980 DIArray SPs = CU.getSubprograms();
983 DIArray EnumTypes = CU.getEnumTypes();
986 DIArray RetainedTypes = CU.getRetainedTypes();
987 for (
unsigned i = 0, e = RetainedTypes.
getNumElements(); i != e; ++i)
989 DIArray Imports = CU.getImportedEntities();
994 processType(
DIType(Entity));
995 else if (Entity.isSubprogram())
997 else if (Entity.isNameSpace())
1008 InitializeTypeMap(M);
1014 void DebugInfoFinder::processType(
DIType DT) {
1020 processType(DCT.getTypeDerivedFrom().resolve(TypeIdentifierMap));
1022 for (
unsigned i = 0, e = DA.getNumElements(); i != e; ++i) {
1031 processType(DDT.getTypeDerivedFrom().resolve(TypeIdentifierMap));
1035 void DebugInfoFinder::processScope(
DIScope Scope) {
1049 if (!addScope(Scope))
1053 processScope(LB.getContext());
1059 processScope(NS.getContext());
1076 void DebugInfoFinder::processSubprogram(
DISubprogram SP) {
1077 if (!addSubprogram(SP))
1082 for (
unsigned I = 0, E = TParams.getNumElements();
I != E; ++
I) {
1086 processScope(TType.getContext().resolve(TypeIdentifierMap));
1087 processType(TType.getType().resolve(TypeIdentifierMap));
1090 processScope(TVal.getContext().resolve(TypeIdentifierMap));
1091 processType(TVal.getType().resolve(TypeIdentifierMap));
1102 InitializeTypeMap(M);
1108 if (!NodesSeen.insert(DV))
1118 InitializeTypeMap(M);
1124 if (!NodesSeen.insert(DV))
1131 bool DebugInfoFinder::addType(
DIType DT) {
1135 if (!NodesSeen.insert(DT))
1146 if (!NodesSeen.insert(CU))
1158 if (!NodesSeen.insert(DIG))
1170 if (!NodesSeen.insert(SP))
1177 bool DebugInfoFinder::addScope(
DIScope Scope) {
1182 if (Scope->getNumOperands() == 0)
1184 if (!NodesSeen.insert(Scope))
1186 Scopes.push_back(Scope);
1206 OS <<
"[ " << Tag <<
" ]";
1208 if (this->isSubrange()) {
1210 }
else if (this->isCompileUnit()) {
1212 }
else if (this->isFile()) {
1214 }
else if (this->isEnumerator()) {
1216 }
else if (this->isBasicType()) {
1218 }
else if (this->isDerivedType()) {
1220 }
else if (this->isCompositeType()) {
1222 }
else if (this->isSubprogram()) {
1224 }
else if (this->isGlobalVariable()) {
1226 }
else if (this->isVariable()) {
1228 }
else if (this->isObjCProperty()) {
1230 }
else if (this->isNameSpace()) {
1232 }
else if (this->isScope()) {
1237 void DISubrange::printInternal(
raw_ostream &OS)
const {
1238 int64_t Count = getCount();
1240 OS <<
" [" << getLo() <<
", " << Count - 1 <<
']';
1242 OS <<
" [unbounded]";
1246 OS <<
" [" << getDirectory() <<
"/" << getFilename() <<
']';
1249 void DICompileUnit::printInternal(
raw_ostream &OS)
const {
1252 unsigned Lang = getLanguage();
1260 void DIEnumerator::printInternal(
raw_ostream &OS)
const {
1261 OS <<
" [" <<
getName() <<
" :: " << getEnumValue() <<
']';
1270 OS <<
" [" << Res <<
"]";
1274 OS <<
" [line " << getLineNumber() <<
", size " << getSizeInBits()
1275 <<
", align " << getAlignInBits() <<
", offset " << getOffsetInBits();
1277 if (
const char *Enc =
1279 OS <<
", enc " << Enc;
1284 else if (isProtected())
1285 OS <<
" [protected]";
1288 OS <<
" [artificial]";
1290 if (isForwardDecl())
1292 else if (getTag() == dwarf::DW_TAG_structure_type ||
1293 getTag() == dwarf::DW_TAG_union_type ||
1294 getTag() == dwarf::DW_TAG_enumeration_type ||
1295 getTag() == dwarf::DW_TAG_class_type)
1299 if (isStaticMember())
1303 void DIDerivedType::printInternal(
raw_ostream &OS)
const {
1305 OS <<
" [from " << getTypeDerivedFrom().getName() <<
']';
1308 void DICompositeType::printInternal(
raw_ostream &OS)
const {
1314 void DINameSpace::printInternal(
raw_ostream &OS)
const {
1317 OS <<
" [" << Name <<
']';
1319 OS <<
" [line " << getLineNumber() <<
']';
1322 void DISubprogram::printInternal(
raw_ostream &OS)
const {
1324 OS <<
" [line " << getLineNumber() <<
']';
1326 if (isLocalToUnit())
1332 if (getScopeLineNumber() != getLineNumber())
1333 OS <<
" [scope " << getScopeLineNumber() <<
"]";
1337 else if (isProtected())
1338 OS <<
" [protected]";
1342 OS <<
" [" << Res <<
']';
1345 void DIGlobalVariable::printInternal(
raw_ostream &OS)
const {
1348 OS <<
" [" << Res <<
']';
1350 OS <<
" [line " << getLineNumber() <<
']';
1354 if (isLocalToUnit())
1361 void DIVariable::printInternal(
raw_ostream &OS)
const {
1364 OS <<
" [" << Res <<
']';
1366 OS <<
" [line " << getLineNumber() <<
']';
1369 void DIObjCProperty::printInternal(
raw_ostream &OS)
const {
1372 OS <<
" [" << Name <<
']';
1374 OS <<
" [line " << getLineNumber() <<
", properties " << getUnsignedField(6)
1382 assert(Scope.
isScope() &&
"Scope of a DebugLoc should be a DIScope.");
1385 CommentOS <<
':' << DL.
getLine();
1387 CommentOS <<
':' << DL.
getCol();
1390 CommentOS <<
" @[ ";
1401 OS << Res <<
"," << getLineNumber();
1402 if (
MDNode *InlinedAt = getInlinedAt()) {
1414 assert(
isScopeRef(V) &&
"DIScopeRef should be a MDString or MDNode");
1417 assert(
isTypeRef(V) &&
"DITypeRef should be a MDString or MDNode");
1422 DIScopeRef DIDescriptor::getFieldAs<DIScopeRef>(
unsigned Elt)
const {
1426 template <>
DITypeRef DIDescriptor::getFieldAs<DITypeRef>(
unsigned Elt)
const {
StringRef getName() const
static bool fieldIsMDString(const MDNode *DbgNode, unsigned Elt)
Check if a field at position Elt of a MDNode is a MDString.
bool Verify() const
Verify that the file descriptor is well formed.
void push_back(const T &Elt)
DITemplateTypeParameter - This is a wrapper for template type parameter.
void replaceOperandWith(unsigned i, Value *NewVal)
replaceOperandWith - Replace a specific operand.
bool Verify() const
Verify - Verify that a composite type descriptor is well formed.
static void deleteTemporary(MDNode *N)
DICompositeType getDICompositeType(DIType T)
getDICompositeType - Find underlying composite type.
void printInternal(raw_ostream &OS) const
DILocation getOrigLocation() const
Constant * getConstantField(unsigned Elt) const
size_t size() const
size - Get the string size.
bool isVariable() const
isVariable - Return true if the specified tag is legal for DIVariable.
void replaceAllUsesWith(DIDescriptor &D)
bool isSubprogram() const
static bool isScopeRef(const Value *Val)
Check if a value can be a ScopeRef.
The main container class for the LLVM Intermediate Representation.
DIScopeRef getContext() const
bool Verify() const
Verify that the imported module descriptor is well formed.
enable_if_c<!is_simple_type< Y >::value, typename cast_retty< X, const Y >::ret_type >::type dyn_cast(const Y &Val)
bool Verify() const
Verify that the template type parameter descriptor is well formed.
unsigned getNumOperands() const
getNumOperands - Return number of MDNode operands.
uint64_t getUInt64Field(unsigned Elt) const
static void fixupSubprogramName(DISubprogram Fn, SmallVectorImpl< char > &Out)
MDNode * getInlinedAt() const
getInlinedAt - If this variable is inlined then return inline location.
NamedMDNode * getOrInsertNamedMetadata(StringRef Name)
DIScope getContext() const
bool isUnspecifiedParameter() const
void reset()
Clear all lists.
MDNode * getObjCProperty() const
getObjCProperty - Return property node, if this ivar is associated with one.
MDNode - a tuple of other values.
FunctionType * getType(LLVMContext &Context, ID id, ArrayRef< Type * > Tys=None)
DIScope getContext() const
DICompositeType getType() const
bool isObjCProperty() const
isObjCProperty - Return true if the specified tag is DW_TAG_APPLE_property.
static MDNode * getNodeField(const MDNode *DbgNode, unsigned Elt)
void processModule(const Module &M)
processModule - Process entire module and collect debug info.
static MDNode * get(LLVMContext &Context, ArrayRef< Value * > Vals)
static Constant * getNullValue(Type *Ty)
StringRef getName() const
Value * getOperand(unsigned i) const LLVM_READONLY
getOperand - Return specified operand.
DIArray - This descriptor holds an array of descriptors.
bool Verify() const
Verify - Verify that a compile unit is well formed.
bool isUnknown() const
isUnknown - Return true if this is an unknown location.
void setTypeArray(DIArray Elements, DIArray TParams=DIArray())
Set the array of member DITypes.
DIScopeRef getContext() const
static bool isTypeRef(const Value *Val)
Check if a value can be a reference to a type.
unsigned getNumAddrElements() const
DIScope getContext() const
bool Verify() const
Verify that the lexical block descriptor is well formed.
DISubrange - This is used to represent ranges, for array bounds.
bool Verify() const
Verify - Verify that a location descriptor is well formed.
void addMember(DIDescriptor D)
bool Verify() const
Verify - Verify that a global variable descriptor is well formed.
DIScopeRef getRef() const
bool Verify() const
Verify - Verify that a derived type descriptor is well formed.
DIDescriptor getEntity() const
DISubprogram - This is a wrapper for a subprogram (e.g. a function).
DIArray getEnumTypes() const
StringRef getDirectory() const
raw_ostream & write_hex(unsigned long long N)
write_hex - Output N in hexadecimal, without any prefix or padding.
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.
void setContainingType(DICompositeType ContainingType)
Set the containing type.
void replaceAllUsesWith(Value *V)
StringRef getName() const
unsigned isOptimized() const
DIFile - This is a wrapper for a file.
MDNode * getVariable() const
DIScopeRef getContext() const
bool isTemplateTypeParameter() const
bool isType() const
isType - Return true if the specified tag is legal for DIType.
DILexicalBlock - This is a wrapper for a lexical block.
DISubprogram getDISubprogram(const MDNode *Scope)
getDISubprogram - Find subprogram that is enclosing this scope.
bool Verify() const
Verify - Verify that a variable descriptor is well formed.
Function * getFunction() const
static void printDebugLoc(DebugLoc DL, raw_ostream &CommentOS, const LLVMContext &Ctx)
DITemplateValueParameter - This is a wrapper for template value parameter.
DIArray getRetainedTypes() const
bool isTemplateValueParameter() const
StringRef getFilename() const
StringRef getName() const
If the scope node has a name, return that, else return an empty string.
MDNode * getVariablesNodes() const
MDString * getIdentifier() const
DIDescriptor getElement(unsigned Idx) const
DIArray getGlobalVariables() const
bool describes(const Function *F)
LLVM Constant Representation.
DIVariable cleanseInlinedVariable(MDNode *DV, LLVMContext &VMContext)
cleanseInlinedVariable - Remove inlined scope from the variable.
void replaceFunctionField(unsigned Elt, Function *F)
static StringRef getStringField(const MDNode *DbgNode, unsigned Elt)
bool isInlinedFnArgument(const Function *CurFn)
DILexicalBlock getScope() const
void printInternal(raw_ostream &OS) const
DIGlobalVariable - This is a wrapper for a global variable.
MDNode * getOperand(unsigned i) const
getOperand - Return specified operand.
const char * AttributeEncodingString(unsigned Encoding)
static bool fieldIsScopeRef(const MDNode *DbgNode, unsigned Elt)
Check if a field at position Elt of a MDNode can be a ScopeRef.
MDNode * getInlinedAt(const LLVMContext &Ctx) const
bool Verify() const
Verify that the file-scoped lexical block descriptor is well formed.
void processValue(const Module &M, const DbgValueInst *DVI)
Process DbgValueInst.
unsigned getNumElements() const
void append(in_iter in_start, in_iter in_end)
MDNode * getVariable() const
bool isImportedEntity() const
Return true if the specified tag is DW_TAG_imported_module or DW_TAG_imported_declaration.
DIArray getTemplateParams() const
bool Verify() const
Verify that the subrange descriptor is well formed.
bool Verify() const
Verify that the enumerator descriptor is well formed.
An imported module (C++ using directive or similar).
DIScope - A base class for various scopes.
std::pair< iterator, bool > insert(const std::pair< KeyT, ValueT > &KV)
T resolve(const DITypeIdentifierMap &Map) const
MDNode * getScope(const LLVMContext &Ctx) const
void processLocation(const Module &M, DILocation Loc)
processLocation - Process DILocation.
DIDescriptor getDescriptorField(unsigned Elt) const
Class for constant integers.
bool Verify() const
Verify - Verify that a derived type descriptor is well formed.
DINameSpace - A wrapper for a C++ style name space.
const char * TagString(unsigned Tag)
int64_t getInt64Field(unsigned Elt) const
bool isLexicalBlockFile() const
bool isGlobalVariable() const
static bool fieldIsMDNode(const MDNode *DbgNode, unsigned Elt)
NamedMDNode * getOrInsertFnSpecificMDNode(Module &M, DISubprogram SP)
StringRef getName() const
raw_ostream & dbgs()
dbgs - Return a circular-buffered debug stream.
StringRef getStringField(unsigned Elt) const
StringRef str() const
Explicit conversion to StringRef.
const char * LanguageString(unsigned Language)
bool isNameSpace() const
isNameSpace - Return true if the specified tag is DW_TAG_namespace.
bool isEnumerator() const
isEnumerator - Return true if the specified tag is DW_TAG_enumerator.
static StringRef getRealLinkageName(StringRef Name)
DIVariable createInlinedVariable(MDNode *DV, MDNode *InlinedScope, LLVMContext &VMContext)
NamedMDNode * getNamedMetadata(const Twine &Name) const
Function * getFunctionField(unsigned Elt) const
bool Verify() const
Verify - Verify that a basic type descriptor is well formed.
std::string getName(ID id, ArrayRef< Type * > Tys=None)
bool Verify() const
Verify - Verify that a type descriptor is well formed.
static IntegerType * getInt32Ty(LLVMContext &C)
static Value * getField(const MDNode *DbgNode, unsigned Elt)
void print(raw_ostream &OS) const
print - print descriptor.
DIRef< DIType > DITypeRef
void processDeclare(const Module &M, const DbgDeclareInst *DDI)
processDeclare - Process DbgDeclareInst.
bool Verify() const
Verify - Verify that a subprogram descriptor is well formed.
void dump() const
dump - print descriptor to dbgs() with a newline.
static DebugLoc getFromDILocation(MDNode *N)
getFromDILocation - Translate the DILocation quad into a DebugLoc.
GlobalVariable * getGlobalVariableField(unsigned Elt) const
bool isCompositeType() const
LLVM Value Representation.
DIArray getImportedEntities() const
DIArray getVariables() const
unsigned getNumOperands() const
getNumOperands - Return the number of NamedMDNode operands.
bool Verify() const
Verify - Verify that a namespace descriptor is well formed.
bool isDerivedType() const
isDerivedType - Return true if the specified tag is legal for DIDerivedType.
DIRef< DIScope > DIScopeRef
NamedMDNode * getFnSpecificMDNode(const Module &M, DISubprogram SP)
DIArray getSubprograms() const
bool isCompileUnit() const
isCompileUnit - Return true if the specified tag is DW_TAG_compile_unit.
bool isLexicalBlock() const
isLexicalBlock - Return true if the specified tag is DW_TAG_lexical_block.
DITypeIdentifierMap generateDITypeIdentifierMap(const NamedMDNode *CU_Nodes)
Construct DITypeIdentifierMap by going through retained types of each CU.
static void VerifySubsetOf(const MDNode *LHS, const MDNode *RHS)
bool Verify() const
Verify that the template value parameter descriptor is well formed.
bool isSubrange() const
isSubrange - Return true if the specified tag is DW_TAG_subrange_type.
void printExtendedName(raw_ostream &OS) const
DICompileUnit - A wrapper for a compile unit.
bool isFile() const
isFile - Return true if the specified tag is DW_TAG_file_type.
MDNode * getFileNode() const
Retrieve the MDNode for the directory/file pair.
bool empty() const
empty - Check if the string is empty.
DIBasicType - A basic type, like 'int' or 'float'.