Simplify logic by using the appropriate functions.
authorAdrian Prantl <aprantl@apple.com>
Wed, 29 May 2013 17:33:31 +0000 (17:33 +0000)
committerAdrian Prantl <aprantl@apple.com>
Wed, 29 May 2013 17:33:31 +0000 (17:33 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182869 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/DebugInfo.h
lib/IR/DebugInfo.cpp

index 456de34c78494d85842ee4507ec6424991057f67..4de7721511e6dde0af139afa786fdd92ea672318 100644 (file)
@@ -285,7 +285,7 @@ namespace llvm {
       return (getFlags() & FlagStaticMember) != 0;
     }
     bool isValid() const {
-      return DbgNode && (isBasicType() || isDerivedType() || isCompositeType());
+      return DbgNode && isType();
     }
 
     /// isUnsignedDIType - Return true if type encoding is unsigned.
index 6a014aee5f32cd8ba6540f8fe9a36aae0293c4ec..68435810edd64d942828f95d91c9b62c795f37c7 100644 (file)
@@ -351,9 +351,8 @@ bool DIDescriptor::isImportedEntity() const {
 
 DIType::DIType(const MDNode *N) : DIScope(N) {
   if (!N) return;
-  if (!isBasicType() && !isDerivedType() && !isCompositeType()) {
+  if (!isType())
     DbgNode = 0;
-  }
 }
 
 unsigned DIArray::getNumElements() const {