[DebugInfo] Delete TypedDINodeRef
TypedDINodeRef<T> is a redundant wrapper of Metadata * that is actually a T *.
Accordingly, change DI{Node,Scope,Type}Ref uses to DI{Node,Scope,Type} * or their const variants.
This allows us to delete many resolve() calls that clutter the code.
Reviewed By: rnk
Differential Revision: https://reviews.llvm.org/D61369
llvm-svn: 360108
diff --git a/llvm/lib/IR/DebugInfoMetadata.cpp b/llvm/lib/IR/DebugInfoMetadata.cpp
index 4ef38b6..d23d42d 100644
--- a/llvm/lib/IR/DebugInfoMetadata.cpp
+++ b/llvm/lib/IR/DebugInfoMetadata.cpp
@@ -88,7 +88,7 @@
DILocation *L = LocA->getInlinedAt();
while (S) {
Locations.insert(std::make_pair(S, L));
- S = S->getScope().resolve();
+ S = S->getScope();
if (!S && L) {
S = L->getScope();
L = L->getInlinedAt();
@@ -100,7 +100,7 @@
while (S) {
if (Locations.count(std::make_pair(S, L)))
break;
- S = S->getScope().resolve();
+ S = S->getScope();
if (!S && L) {
S = L->getScope();
L = L->getInlinedAt();
@@ -209,7 +209,7 @@
return Flags;
}
-DIScopeRef DIScope::getScope() const {
+DIScope *DIScope::getScope() const {
if (auto *T = dyn_cast<DIType>(this))
return T->getScope();