Fix DIType verifier. The element 3 is DIFile now.

llvm-svn: 118054
This commit is contained in:
Devang Patel 2010-11-02 20:41:13 +00:00
parent a83859539f
commit 415c551459
1 changed files with 4 additions and 3 deletions

View File

@ -305,9 +305,10 @@ bool DIType::Verify() const {
return false;
if (!getContext().Verify())
return false;
DICompileUnit CU = getCompileUnit();
if (!CU.Verify())
unsigned Tag = getTag();
if (!isBasicType() && Tag != dwarf::DW_TAG_const_type &&
Tag != dwarf::DW_TAG_volatile_type && Tag != dwarf::DW_TAG_pointer_type &&
Tag != dwarf::DW_TAG_restrict_type && getFilename().empty())
return false;
return true;
}