Skip to content

Commit

Permalink
Simplify logic by using the appropriate functions.
Browse files Browse the repository at this point in the history
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182869 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
adrian-prantl committed May 29, 2013
1 parent 742671b commit 88c7440
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion include/llvm/DebugInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
3 changes: 1 addition & 2 deletions lib/IR/DebugInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 88c7440

Please sign in to comment.