[llvm] r190321 - Debug Info: Update isScope to make sure DIType is a scope and

Manman Ren manman.ren at gmail.com
Mon Sep 9 12:00:55 PDT 2013


Author: mren
Date: Mon Sep  9 14:00:55 2013
New Revision: 190321

URL: http://llvm.org/viewvc/llvm-project?rev=190321&view=rev
Log:
Debug Info: Update isScope to make sure DIType is a scope and
TAG_file_type is also a scope.

Modified:
    llvm/trunk/lib/IR/DebugInfo.cpp

Modified: llvm/trunk/lib/IR/DebugInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/DebugInfo.cpp?rev=190321&r1=190320&r2=190321&view=diff
==============================================================================
--- llvm/trunk/lib/IR/DebugInfo.cpp (original)
+++ llvm/trunk/lib/IR/DebugInfo.cpp Mon Sep  9 14:00:55 2013
@@ -246,11 +246,12 @@ bool DIDescriptor::isScope() const {
   case dwarf::DW_TAG_lexical_block:
   case dwarf::DW_TAG_subprogram:
   case dwarf::DW_TAG_namespace:
+  case dwarf::DW_TAG_file_type:
     return true;
   default:
     break;
   }
-  return false;
+  return isType();
 }
 
 /// isTemplateTypeParameter - Return true if the specified tag is





More information about the llvm-commits mailing list