summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen
diff options
context:
space:
mode:
authorEric Christopher <echristo@apple.com>2012-04-05 22:03:32 +0000
committerEric Christopher <echristo@apple.com>2012-04-05 22:03:32 +0000
commitf3dd713bce34f46f5d6d690ce14a214ce6018c04 (patch)
tree8f2bb35c103c89cf07633e88f36799ee6ca9b0ca /clang/lib/CodeGen
parent1fa36050abd8b798927829f0b0a4362f9e9c63eb (diff)
downloadbcm5719-llvm-f3dd713bce34f46f5d6d690ce14a214ce6018c04.tar.gz
bcm5719-llvm-f3dd713bce34f46f5d6d690ce14a214ce6018c04.zip
Only emit the getter and setter names if they're not the default
synthesized ones. Reasonable debug info size reduction for objc. rdar://11179756 llvm-svn: 154129
Diffstat (limited to 'clang/lib/CodeGen')
-rw-r--r--clang/lib/CodeGen/CGDebugInfo.cpp18
1 files changed, 13 insertions, 5 deletions
diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp
index 9a33ade99b1..587ab8a3571 100644
--- a/clang/lib/CodeGen/CGDebugInfo.cpp
+++ b/clang/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));
}
}
}
OpenPOWER on IntegriCloud