diff options
| author | Eric Christopher <echristo@apple.com> | 2012-06-05 18:16:22 +0000 |
|---|---|---|
| committer | Eric Christopher <echristo@apple.com> | 2012-06-05 18:16:22 +0000 |
| commit | beafa44be8ffe0972a799b073c48f7edc134d59f (patch) | |
| tree | 9289914abfeeceb02702c10102b32734e38762a6 /clang/lib/CodeGen | |
| parent | cc389be552298a0dc696ccb86a5b35aef91a84da (diff) | |
| download | bcm5719-llvm-beafa44be8ffe0972a799b073c48f7edc134d59f.tar.gz bcm5719-llvm-beafa44be8ffe0972a799b073c48f7edc134d59f.zip | |
Reapply "Only emit debug information for methods that are user defined, there's"
As the failing testcase has been fixed.
This reverts commit 0637f407e6ee7fdccde17fbf9a5fcc4853187b3e.
llvm-svn: 158009
Diffstat (limited to 'clang/lib/CodeGen')
| -rw-r--r-- | clang/lib/CodeGen/CGDebugInfo.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp index e8791751f5f..07ddc338811 100644 --- a/clang/lib/CodeGen/CGDebugInfo.cpp +++ b/clang/lib/CodeGen/CGDebugInfo.cpp @@ -991,8 +991,12 @@ CollectCXXMemberFunctions(const CXXRecordDecl *RD, llvm::DIFile Unit, if (D->isImplicit() && !D->isUsed()) continue; - if (const CXXMethodDecl *Method = dyn_cast<CXXMethodDecl>(D)) - EltTys.push_back(CreateCXXMemberFunction(Method, Unit, RecordTy)); + if (const CXXMethodDecl *Method = dyn_cast<CXXMethodDecl>(D)) { + // Only emit debug information for user provided functions, we're + // unlikely to want info for artificial functions. + if (Method->isUserProvided()) + EltTys.push_back(CreateCXXMemberFunction(Method, Unit, RecordTy)); + } else if (FunctionTemplateDecl *FTD = dyn_cast<FunctionTemplateDecl>(D)) for (FunctionTemplateDecl::spec_iterator SI = FTD->spec_begin(), SE = FTD->spec_end(); SI != SE; ++SI) { |

