From c6458d6a4d3b5b8b95794f05c555990f9b037b82 Mon Sep 17 00:00:00 2001 From: Adrian Prantl Date: Sat, 19 Sep 2015 00:10:32 +0000 Subject: Refactor ASTReader::getSourceDescriptor(const Module &) into a constructor of ASTSourceDescriptor. It was effectively a static function. NFC. llvm-svn: 248069 --- clang/lib/CodeGen/CGDebugInfo.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'clang/lib/CodeGen/CGDebugInfo.cpp') diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp index 723e8ffde3b..7d6bd166873 100644 --- a/clang/lib/CodeGen/CGDebugInfo.cpp +++ b/clang/lib/CodeGen/CGDebugInfo.cpp @@ -3391,8 +3391,7 @@ void CGDebugInfo::EmitUsingDecl(const UsingDecl &UD) { } void CGDebugInfo::EmitImportDecl(const ImportDecl &ID) { - auto *Reader = CGM.getContext().getExternalSource(); - auto Info = Reader->getSourceDescriptor(*ID.getImportedModule()); + auto Info = ExternalASTSource::ASTSourceDescriptor(*ID.getImportedModule()); DBuilder.createImportedDeclaration( getCurrentContextDescriptor(cast(ID.getDeclContext())), getOrCreateModuleRef(Info, DebugTypeExtRefs), -- cgit v1.2.3