From 88c744083d6cf5f4810c1e9fe457a212bb24d432 Mon Sep 17 00:00:00 2001 From: Adrian Prantl Date: Wed, 29 May 2013 17:33:31 +0000 Subject: [PATCH] Simplify logic by using the appropriate functions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182869 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/DebugInfo.h | 2 +- lib/IR/DebugInfo.cpp | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/include/llvm/DebugInfo.h b/include/llvm/DebugInfo.h index 456de34c7849..4de7721511e6 100644 --- a/include/llvm/DebugInfo.h +++ b/include/llvm/DebugInfo.h @@ -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. diff --git a/lib/IR/DebugInfo.cpp b/lib/IR/DebugInfo.cpp index 6a014aee5f32..68435810edd6 100644 --- a/lib/IR/DebugInfo.cpp +++ b/lib/IR/DebugInfo.cpp @@ -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 {