diff options
author | Devang Patel <dpatel@apple.com> | 2010-11-02 20:41:13 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2010-11-02 20:41:13 +0000 |
commit | 415c551459cd4cc84df2e54a47c1831c31753597 (patch) | |
tree | 448de400e3be9689a3dd15471b5efe514d57d671 /llvm/lib | |
parent | a83859539ff5925804293812058f66ddd76709ed (diff) | |
download | bcm5719-llvm-415c551459cd4cc84df2e54a47c1831c31753597.tar.gz bcm5719-llvm-415c551459cd4cc84df2e54a47c1831c31753597.zip |
Fix DIType verifier. The element 3 is DIFile now.
llvm-svn: 118054
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/Analysis/DebugInfo.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/llvm/lib/Analysis/DebugInfo.cpp b/llvm/lib/Analysis/DebugInfo.cpp index 3dd659833e0..cdccfcc4901 100644 --- a/llvm/lib/Analysis/DebugInfo.cpp +++ b/llvm/lib/Analysis/DebugInfo.cpp @@ -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; } |