summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorAdrian Prantl <aprantl@apple.com>2013-05-29 17:33:31 +0000
committerAdrian Prantl <aprantl@apple.com>2013-05-29 17:33:31 +0000
commit4db8f644228d9f5354d197e185b61c9ce165f896 (patch)
tree7e56cd447dd44dda1c5e2384f278b70830e1e52d /llvm
parent013da5cb37a4d9529e5482746efa20631d985be7 (diff)
downloadbcm5719-llvm-4db8f644228d9f5354d197e185b61c9ce165f896.tar.gz
bcm5719-llvm-4db8f644228d9f5354d197e185b61c9ce165f896.zip
Simplify logic by using the appropriate functions.
llvm-svn: 182869
Diffstat (limited to 'llvm')
-rw-r--r--llvm/include/llvm/DebugInfo.h2
-rw-r--r--llvm/lib/IR/DebugInfo.cpp3
2 files changed, 2 insertions, 3 deletions
diff --git a/llvm/include/llvm/DebugInfo.h b/llvm/include/llvm/DebugInfo.h
index 456de34c784..4de7721511e 100644
--- a/llvm/include/llvm/DebugInfo.h
+++ b/llvm/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/llvm/lib/IR/DebugInfo.cpp b/llvm/lib/IR/DebugInfo.cpp
index 6a014aee5f3..68435810edd 100644
--- a/llvm/lib/IR/DebugInfo.cpp
+++ b/llvm/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 {
OpenPOWER on IntegriCloud