summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR/DIBuilder.cpp
diff options
context:
space:
mode:
authorFangrui Song <maskray@google.com>2019-05-07 02:06:37 +0000
committerFangrui Song <maskray@google.com>2019-05-07 02:06:37 +0000
commitda82ce99b7460164ffb841619aadb44f397d2106 (patch)
tree6eeb15bafc58fe997fd3b0666fb47331e9287746 /llvm/lib/IR/DIBuilder.cpp
parenta400ca3f3d42de0b0aa5c441de761d182c6010e8 (diff)
downloadbcm5719-llvm-da82ce99b7460164ffb841619aadb44f397d2106.tar.gz
bcm5719-llvm-da82ce99b7460164ffb841619aadb44f397d2106.zip
[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
Diffstat (limited to 'llvm/lib/IR/DIBuilder.cpp')
-rw-r--r--llvm/lib/IR/DIBuilder.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/IR/DIBuilder.cpp b/llvm/lib/IR/DIBuilder.cpp
index 0cd33704093..2493c6cbe53 100644
--- a/llvm/lib/IR/DIBuilder.cpp
+++ b/llvm/lib/IR/DIBuilder.cpp
@@ -166,8 +166,8 @@ createImportedModule(LLVMContext &C, dwarf::Tag Tag, DIScope *Context,
if (Line)
assert(File && "Source location has line number but no file");
unsigned EntitiesCount = C.pImpl->DIImportedEntitys.size();
- auto *M =
- DIImportedEntity::get(C, Tag, Context, DINodeRef(NS), File, Line, Name);
+ auto *M = DIImportedEntity::get(C, Tag, Context, cast_or_null<DINode>(NS),
+ File, Line, Name);
if (EntitiesCount < C.pImpl->DIImportedEntitys.size())
// A new Imported Entity was just added to the context.
// Add it to the Imported Modules list.
OpenPOWER on IntegriCloud