Simplify logic by using the appropriate functions.
llvm-svn: 182869
This commit is contained in:
parent
013da5cb37
commit
4db8f64422
|
@ -285,7 +285,7 @@ namespace llvm {
|
||||||
return (getFlags() & FlagStaticMember) != 0;
|
return (getFlags() & FlagStaticMember) != 0;
|
||||||
}
|
}
|
||||||
bool isValid() const {
|
bool isValid() const {
|
||||||
return DbgNode && (isBasicType() || isDerivedType() || isCompositeType());
|
return DbgNode && isType();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// isUnsignedDIType - Return true if type encoding is unsigned.
|
/// isUnsignedDIType - Return true if type encoding is unsigned.
|
||||||
|
|
|
@ -351,10 +351,9 @@ bool DIDescriptor::isImportedEntity() const {
|
||||||
|
|
||||||
DIType::DIType(const MDNode *N) : DIScope(N) {
|
DIType::DIType(const MDNode *N) : DIScope(N) {
|
||||||
if (!N) return;
|
if (!N) return;
|
||||||
if (!isBasicType() && !isDerivedType() && !isCompositeType()) {
|
if (!isType())
|
||||||
DbgNode = 0;
|
DbgNode = 0;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
unsigned DIArray::getNumElements() const {
|
unsigned DIArray::getNumElements() const {
|
||||||
if (!DbgNode)
|
if (!DbgNode)
|
||||||
|
|
Loading…
Reference in New Issue