aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Analysis/DebugInfo.cpp
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2010-11-02 20:41:13 +0000
committerDevang Patel <dpatel@apple.com>2010-11-02 20:41:13 +0000
commitb71bbf9ec1ecff21219faafe27bc7c562aba344b (patch)
tree2741546ff033eeaca1c7b5546f47150c464d40e5 /lib/Analysis/DebugInfo.cpp
parentf0ea0f2b1575868cd238391868d8f51370041303 (diff)
downloadexternal_llvm-b71bbf9ec1ecff21219faafe27bc7c562aba344b.zip
external_llvm-b71bbf9ec1ecff21219faafe27bc7c562aba344b.tar.gz
external_llvm-b71bbf9ec1ecff21219faafe27bc7c562aba344b.tar.bz2
Fix DIType verifier. The element 3 is DIFile now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118054 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/DebugInfo.cpp')
-rw-r--r--lib/Analysis/DebugInfo.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/Analysis/DebugInfo.cpp b/lib/Analysis/DebugInfo.cpp
index 3dd6598..cdccfcc 100644
--- a/lib/Analysis/DebugInfo.cpp
+++ b/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;
}