diff options
author | Eric Christopher <echristo@gmail.com> | 2014-03-27 05:29:34 +0000 |
---|---|---|
committer | Eric Christopher <echristo@gmail.com> | 2014-03-27 05:29:34 +0000 |
commit | eb0693fd60b846b841d88de9f09dad135e925d40 (patch) | |
tree | ecf718b03ad3d7b7e7f4ae61d020cd6399cf4e8f /lib/CodeGen/CGDebugInfo.cpp | |
parent | 0ec213d4c9a6141c881c4df3ae9dd667a18f95da (diff) | |
download | clang-eb0693fd60b846b841d88de9f09dad135e925d40.tar.gz clang-eb0693fd60b846b841d88de9f09dad135e925d40.tar.bz2 clang-eb0693fd60b846b841d88de9f09dad135e925d40.tar.xz |
Revert "Just call getContextDescriptor to get the context for subprograms"
while I investigate as it seems to be causing issues with the gdb bot.
This reverts commit r204874.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@204896 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGDebugInfo.cpp')
-rw-r--r-- | lib/CodeGen/CGDebugInfo.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/lib/CodeGen/CGDebugInfo.cpp b/lib/CodeGen/CGDebugInfo.cpp index 92f5e63296..1a3089a14b 100644 --- a/lib/CodeGen/CGDebugInfo.cpp +++ b/lib/CodeGen/CGDebugInfo.cpp @@ -2541,10 +2541,15 @@ void CGDebugInfo::EmitFunctionStart(GlobalDecl GD, QualType FnType, DebugKind <= CodeGenOptions::DebugLineTablesOnly)) LinkageName = StringRef(); - // If we aren't in line table only mode then grab a full context and - // template parameters for the function. if (DebugKind >= CodeGenOptions::LimitedDebugInfo) { - FDContext = getContextDescriptor(cast<Decl>(FD->getDeclContext())); + 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)); + + // Collect template parameters. TParamsArray = CollectFunctionTemplateParams(FD, Unit); } } else if (const ObjCMethodDecl *OMD = dyn_cast<ObjCMethodDecl>(D)) { |