diff options
author | Devang Patel <dpatel@apple.com> | 2011-05-17 00:20:09 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2011-05-17 00:20:09 +0000 |
commit | bc6a191a1575fa3b7785fe5cbe01463d220553a7 (patch) | |
tree | b1845ee628b595c22703f8872d806a9d28c226ce /lib/CodeGen/CGDebugInfo.cpp | |
parent | 1f2f384eb7d0ea368819fe9cc4cc20a4b337ebea (diff) |
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
Diffstat (limited to 'lib/CodeGen/CGDebugInfo.cpp')
-rw-r--r-- | lib/CodeGen/CGDebugInfo.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
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<NamespaceDecl>(FD->getDeclContext())) FDContext = getOrCreateNameSpace(NSDecl); + else if (const RecordDecl *RDecl = + dyn_cast_or_null<RecordDecl>(FD->getDeclContext())) + FDContext = getContextDescriptor(cast<Decl>(RDecl->getDeclContext())); // Collect template parameters. TParamsArray = CollectFunctionTemplateParams(FD, Unit); |