/// entry.
void CompileUnit::addSourceLine(DIE *Die, DIVariable V) {
// Verify variable.
- if (!V.Verify())
+ if (!V.isVariable())
return;
unsigned Line = V.getLineNumber();
/// entry.
void CompileUnit::addSourceLine(DIE *Die, DIGlobalVariable G) {
// Verify global variable.
- if (!G.Verify())
+ if (!G.isGlobalVariable())
return;
unsigned Line = G.getLineNumber();
/// entry.
void CompileUnit::addSourceLine(DIE *Die, DISubprogram SP) {
// Verify subprogram.
- if (!SP.Verify())
+ if (!SP.isSubprogram())
return;
// If the line number is 0, don't add it.
/// entry.
void CompileUnit::addSourceLine(DIE *Die, DIType Ty) {
// Verify type.
- if (!Ty.Verify())
+ if (!Ty.isType())
return;
unsigned Line = Ty.getLineNumber();
/// entry.
void CompileUnit::addSourceLine(DIE *Die, DIObjCProperty Ty) {
// Verify type.
- if (!Ty.Verify())
+ if (!Ty.isObjCProperty())
return;
unsigned Line = Ty.getLineNumber();
/// given DIType.
DIE *CompileUnit::getOrCreateTypeDIE(const MDNode *TyNode) {
DIType Ty(TyNode);
- if (!Ty.Verify())
+ if (!Ty.isType())
return NULL;
DIE *TyDIE = getDIE(Ty);
if (TyDIE)
/// addType - Add a new type attribute to the specified entity.
void CompileUnit::addType(DIE *Entity, DIType Ty, unsigned Attribute) {
- if (!Ty.Verify())
+ if (!Ty.isType())
return;
// Check for pre-existence.
DIArray Args = SPTy.getTypeArray();
for (unsigned i = 0, e = Args.getNumElements(); i != e; ++i) {
DIType ATy(Args.getElement(i));
- if (!ATy.Verify())
+ if (!ATy.isType())
continue;
addGlobalType(ATy);
}
}
}
DIType DTy = CTy.getTypeDerivedFrom();
- if (DTy.Verify()) {
+ if (DTy.isType()) {
addType(&Buffer, DTy);
addUInt(&Buffer, dwarf::DW_AT_enum_class, dwarf::DW_FORM_flag, 1);
}
return;
DIGlobalVariable GV(N);
- if (!GV.Verify())
+ if (!GV.isGlobalVariable())
return;
DIDescriptor GVContext = GV.getContext();
for (unsigned i = 0, e = Subprograms.getNumElements(); i != e; ++i) {
DISubprogram SP(Subprograms.getElement(i));
if (ProcessedSPNodes.count(SP) != 0) continue;
- if (!SP.Verify()) continue;
+ if (!SP.isSubprogram()) continue;
if (!SP.isDefinition()) continue;
DIArray Variables = SP.getVariables();
if (Variables.getNumElements() == 0) continue;
DIE *ScopeDIE = SPCU->getDIE(SP);
for (unsigned vi = 0, ve = Variables.getNumElements(); vi != ve; ++vi) {
DIVariable DV(Variables.getElement(vi));
- if (!DV.Verify()) continue;
+ if (!DV.isVariable()) continue;
DbgVariable *NewVar = new DbgVariable(DV, NULL);
if (DIE *VariableDIE =
SPCU->constructVariableDIE(NewVar, Scope->isAbstractScope()))
DIArray Variables = DISubprogram(FnScope->getScopeNode()).getVariables();
for (unsigned i = 0, e = Variables.getNumElements(); i != e; ++i) {
DIVariable DV(Variables.getElement(i));
- if (!DV || !DV.Verify() || !Processed.insert(DV))
+ if (!DV || !DV.isVariable() || !Processed.insert(DV))
continue;
if (LexicalScope *Scope = LScopes.findLexicalScope(DV.getContext()))
addScopeVariable(Scope, new DbgVariable(DV, NULL));
static DebugLoc getFnDebugLoc(DebugLoc DL, const LLVMContext &Ctx) {
const MDNode *Scope = getScopeNode(DL, Ctx);
DISubprogram SP = getDISubprogram(Scope);
- if (SP.Verify()) {
+ if (SP.isSubprogram()) {
// Check for number of operands since the compatibility is
// cheap here.
if (SP->getNumOperands() > 19)
// The first mention of a function argument gets the FunctionBeginSym
// label, so arguments are visible when breaking at function entry.
DIVariable DV(Var);
- if (DV.Verify() && DV.getTag() == dwarf::DW_TAG_arg_variable &&
+ if (DV.isVariable() && DV.getTag() == dwarf::DW_TAG_arg_variable &&
DISubprogram(getDISubprogram(DV.getContext()))
.describes(MF->getFunction()))
LabelsBeforeInsn[MI] = FunctionBeginSym;
for (unsigned i = 0, e = AList.size(); i != e; ++i) {
LexicalScope *AScope = AList[i];
DISubprogram SP(AScope->getScopeNode());
- if (SP.Verify()) {
+ if (SP.isSubprogram()) {
// Collect info for variables that were optimized out.
DIArray Variables = SP.getVariables();
for (unsigned i = 0, e = Variables.getNumElements(); i != e; ++i) {
DIVariable DV(Variables.getElement(i));
- if (!DV || !DV.Verify() || !ProcessedVars.insert(DV))
+ if (!DV || !DV.isVariable() || !ProcessedVars.insert(DV))
continue;
// Check that DbgVariable for DV wasn't created earlier, when
// findAbstractVariable() was called for inlined instance of DV.
}
bool variableHasComplexAddress() const {
- assert(Var.Verify() && "Invalid complex DbgVariable!");
+ assert(Var.isVariable() && "Invalid complex DbgVariable!");
return Var.hasComplexAddress();
}
bool isBlockByrefVariable() const {
- assert(Var.Verify() && "Invalid complex DbgVariable!");
+ assert(Var.isVariable() && "Invalid complex DbgVariable!");
return Var.isBlockByrefVariable();
}
unsigned getNumAddrElements() const {
- assert(Var.Verify() && "Invalid complex DbgVariable!");
+ assert(Var.isVariable() && "Invalid complex DbgVariable!");
return Var.getNumAddrElements();
}
uint64_t getAddrElement(unsigned i) const {