OSDN Git Service
(root)
/
android-x86
/
external-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1cfad01
)
IR: isScopeRef() should check isScope()
author
Duncan P. N. Exon Smith
<dexonsmith@apple.com>
Wed, 18 Feb 2015 19:46:02 +0000
(19:46 +0000)
committer
Duncan P. N. Exon Smith
<dexonsmith@apple.com>
Wed, 18 Feb 2015 19:46:02 +0000
(19:46 +0000)
r229733 removed an invalid use of `DIScopeRef`, so now we can enforce
that a `DIScopeRef` is actually a scope.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229734
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/IR/DebugInfo.cpp
patch
|
blob
|
history
diff --git
a/lib/IR/DebugInfo.cpp
b/lib/IR/DebugInfo.cpp
index
32521b1
..
c39c119
100644
(file)
--- a/
lib/IR/DebugInfo.cpp
+++ b/
lib/IR/DebugInfo.cpp
@@
-418,7
+418,9
@@
static bool isScopeRef(const Metadata *MD) {
return true;
if (auto *S = dyn_cast<MDString>(MD))
return !S->getString().empty();
- return isa<MDNode>(MD);
+ if (auto *N = dyn_cast<MDNode>(MD))
+ return DIScope(N).isScope();
+ return false;
}
/// \brief Check if a field at position Elt of a MDNode can be a ScopeRef.