From da82ce99b7460164ffb841619aadb44f397d2106 Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Tue, 7 May 2019 02:06:37 +0000 Subject: [DebugInfo] Delete TypedDINodeRef TypedDINodeRef 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 --- llvm/lib/IR/DIBuilder.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'llvm/lib/IR/DIBuilder.cpp') 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(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. -- cgit v1.2.3