diff options
author | Eric Christopher <echristo@apple.com> | 2012-04-05 22:03:32 +0000 |
---|---|---|
committer | Eric Christopher <echristo@apple.com> | 2012-04-05 22:03:32 +0000 |
commit | 78af8fd568f05aa872194756c96d8ba73d8c4956 (patch) | |
tree | 952a7a6d04a7f9432d9eaae4f20a7aa0279d75f1 /lib/CodeGen/CGDebugInfo.cpp | |
parent | 87b9c0311f96c35109204a49d4bda909aa72b62a (diff) |
Only emit the getter and setter names if they're not the default
synthesized ones. Reasonable debug info size reduction for objc.
rdar://11179756
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154129 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGDebugInfo.cpp')
-rw-r--r-- | lib/CodeGen/CGDebugInfo.cpp | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/lib/CodeGen/CGDebugInfo.cpp b/lib/CodeGen/CGDebugInfo.cpp index 9a33ade99b..587ab8a357 100644 --- a/lib/CodeGen/CGDebugInfo.cpp +++ b/lib/CodeGen/CGDebugInfo.cpp @@ -1327,10 +1327,14 @@ llvm::DIType CGDebugInfo::CreateType(const ObjCInterfaceType *Ty, SourceLocation Loc = PD->getLocation(); llvm::DIFile PUnit = getOrCreateFile(Loc); unsigned PLine = getLineNumber(Loc); + ObjCMethodDecl *Getter = PD->getGetterMethodDecl(); + ObjCMethodDecl *Setter = PD->getSetterMethodDecl(); llvm::MDNode *PropertyNode = DBuilder.createObjCProperty(PD->getName(), PUnit, PLine, + (Getter && Getter->isImplicit()) ? "" : getSelectorName(PD->getGetterName()), + (Setter && Setter->isImplicit()) ? "" : getSelectorName(PD->getSetterName()), PD->getPropertyAttributes(), getOrCreateType(PD->getType(), PUnit)); @@ -1388,13 +1392,17 @@ llvm::DIType CGDebugInfo::CreateType(const ObjCInterfaceType *Ty, SourceLocation Loc = PD->getLocation(); llvm::DIFile PUnit = getOrCreateFile(Loc); unsigned PLine = getLineNumber(Loc); - PropertyNode = - DBuilder.createObjCProperty(PD->getName(), - PUnit, PLine, + ObjCMethodDecl *Getter = PD->getGetterMethodDecl(); + ObjCMethodDecl *Setter = PD->getSetterMethodDecl(); + PropertyNode = + DBuilder.createObjCProperty(PD->getName(), + PUnit, PLine, + (Getter && Getter->isImplicit()) ? "" : getSelectorName(PD->getGetterName()), + (Setter && Setter->isImplicit()) ? "" : getSelectorName(PD->getSetterName()), - PD->getPropertyAttributes(), - getOrCreateType(PD->getType(),PUnit)); + PD->getPropertyAttributes(), + getOrCreateType(PD->getType(), PUnit)); } } } |