From: Devang Patel Date: Tue, 17 May 2011 00:20:09 +0000 (+0000) Subject: Set up appropriate context for member function. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=bc6a191a1575fa3b7785fe5cbe01463d220553a7;p=clang Set up appropriate context for member function. Radar 9440721 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131441 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/CGDebugInfo.cpp b/lib/CodeGen/CGDebugInfo.cpp index 737668a7da..1c9d91a2e3 100644 --- a/lib/CodeGen/CGDebugInfo.cpp +++ b/lib/CodeGen/CGDebugInfo.cpp @@ -1658,6 +1658,9 @@ void CGDebugInfo::EmitFunctionStart(GlobalDecl GD, QualType FnType, if (const NamespaceDecl *NSDecl = dyn_cast_or_null(FD->getDeclContext())) FDContext = getOrCreateNameSpace(NSDecl); + else if (const RecordDecl *RDecl = + dyn_cast_or_null(FD->getDeclContext())) + FDContext = getContextDescriptor(cast(RDecl->getDeclContext())); // Collect template parameters. TParamsArray = CollectFunctionTemplateParams(FD, Unit);