Simplify logic by using the appropriate functions.

llvm-svn: 182869
This commit is contained in:
Adrian Prantl 2013-05-29 17:33:31 +00:00
parent 013da5cb37
commit 4db8f64422
2 changed files with 2 additions and 3 deletions

View 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.

View File

@ -351,10 +351,9 @@ 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 {
if (!DbgNode)