summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR/DebugInfo.cpp
diff options
context:
space:
mode:
authorAdrian Prantl <aprantl@apple.com>2014-04-01 21:04:24 +0000
committerAdrian Prantl <aprantl@apple.com>2014-04-01 21:04:24 +0000
commit6b444c5c8edb6ec280cd6cdd5275ae27e31e4fc7 (patch)
tree93a7e7aea3f3dbd1bf0855b2a1989835c0ebbe16 /llvm/lib/IR/DebugInfo.cpp
parent75ce62acefd0dd2ad56d081ca6551241b57a109f (diff)
downloadbcm5719-llvm-6b444c5c8edb6ec280cd6cdd5275ae27e31e4fc7.tar.gz
bcm5719-llvm-6b444c5c8edb6ec280cd6cdd5275ae27e31e4fc7.zip
Add a comment about the DIDescriptor class hierarchy.
llvm-svn: 205358
Diffstat (limited to 'llvm/lib/IR/DebugInfo.cpp')
-rw-r--r--llvm/lib/IR/DebugInfo.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/lib/IR/DebugInfo.cpp b/llvm/lib/IR/DebugInfo.cpp
index f9bc63b389e..c9d68afa445 100644
--- a/llvm/lib/IR/DebugInfo.cpp
+++ b/llvm/lib/IR/DebugInfo.cpp
@@ -429,8 +429,10 @@ static bool fieldIsTypeRef(const MDNode *DbgNode, unsigned Elt) {
/// Check if a value can be a ScopeRef.
static bool isScopeRef(const Value *Val) {
return !Val ||
- (isa<MDString>(Val) && !cast<MDString>(Val)->getString().empty()) ||
- isa<MDNode>(Val);
+ (isa<MDString>(Val) && !cast<MDString>(Val)->getString().empty()) ||
+ // Not checking for Val->isScope() here, because it would work
+ // only for lexical scopes and not all subclasses of DIScope.
+ isa<MDNode>(Val);
}
/// Check if a field at position Elt of a MDNode can be a ScopeRef.
OpenPOWER on IntegriCloud