Fix DIType verifier. The element 3 is DIFile now.
authorDevang Patel <dpatel@apple.com>
Tue, 2 Nov 2010 20:41:13 +0000 (20:41 +0000)
committerDevang Patel <dpatel@apple.com>
Tue, 2 Nov 2010 20:41:13 +0000 (20:41 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118054 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/DebugInfo.cpp

index 3dd659833e0fbafc4ab44b485cd1dcbf4d46a394..cdccfcc4901825153cb61738b8ceadad6303c6d6 100644 (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;
 }