[llvm] r182869 - Simplify logic by using the appropriate functions.

Adrian Prantl aprantl at apple.com
Wed May 29 10:33:31 PDT 2013


Author: adrian
Date: Wed May 29 12:33:31 2013
New Revision: 182869

URL: http://llvm.org/viewvc/llvm-project?rev=182869&view=rev
Log:
Simplify logic by using the appropriate functions.

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

Modified: llvm/trunk/include/llvm/DebugInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo.h?rev=182869&r1=182868&r2=182869&view=diff
==============================================================================
--- llvm/trunk/include/llvm/DebugInfo.h (original)
+++ llvm/trunk/include/llvm/DebugInfo.h Wed May 29 12:33:31 2013
@@ -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.

Modified: llvm/trunk/lib/IR/DebugInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/DebugInfo.cpp?rev=182869&r1=182868&r2=182869&view=diff
==============================================================================
--- llvm/trunk/lib/IR/DebugInfo.cpp (original)
+++ llvm/trunk/lib/IR/DebugInfo.cpp Wed May 29 12:33:31 2013
@@ -351,9 +351,8 @@ bool DIDescriptor::isImportedEntity() co
 
 DIType::DIType(const MDNode *N) : DIScope(N) {
   if (!N) return;
-  if (!isBasicType() && !isDerivedType() && !isCompositeType()) {
+  if (!isType())
     DbgNode = 0;
-  }
 }
 
 unsigned DIArray::getNumElements() const {





More information about the llvm-commits mailing list