forked from OSchip/llvm-project
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
This commit is contained in:
parent
1fa36050ab
commit
f3dd713bce
|
@ -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));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
// RUN: %clang_cc1 -masm-verbose -S -g %s -o - | FileCheck %s
|
||||
|
||||
// CHECK: AT_APPLE_property_name
|
||||
// CHECK: AT_APPLE_property_getter
|
||||
// CHECK: AT_APPLE_property_setter
|
||||
// CHECK: AT_APPLE_property_attribute
|
||||
// CHECK: AT_APPLE_property
|
||||
@interface I1 {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// RUN: %clang_cc1 -S -emit-llvm -g %s -o - | FileCheck %s
|
||||
|
||||
// CHECK: metadata !"p1", metadata !6, i32 5, metadata !"p1", metadata !"setP1:", i32 2316, metadata !9} ; [ DW_TAG_APPLE_property ]
|
||||
// CHECK: metadata !"p1", metadata !6, i32 5, metadata !"", metadata !"", i32 2316, metadata !9} ; [ DW_TAG_APPLE_property ]
|
||||
@interface I1
|
||||
@property int p1;
|
||||
@end
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
// RUN: %clang_cc1 -fobjc-default-synthesize-properties -masm-verbose -S -g %s -o - | FileCheck %s
|
||||
|
||||
// CHECK: AT_APPLE_property_name
|
||||
// CHECK: AT_APPLE_property_getter
|
||||
// CHECK: AT_APPLE_property_setter
|
||||
// CHECK: AT_APPLE_property_attribute
|
||||
// CHECK: AT_APPLE_property
|
||||
|
||||
|
|
Loading…
Reference in New Issue