aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGDebugInfo.cpp
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2011-05-17 00:20:09 +0000
committerDevang Patel <dpatel@apple.com>2011-05-17 00:20:09 +0000
commitbc6a191a1575fa3b7785fe5cbe01463d220553a7 (patch)
treeb1845ee628b595c22703f8872d806a9d28c226ce /lib/CodeGen/CGDebugInfo.cpp
parent1f2f384eb7d0ea368819fe9cc4cc20a4b337ebea (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.cpp3
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);