зеркало из https://github.com/microsoft/clang-1.git
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
This commit is contained in:
Родитель
87b9c0311f
Коммит
78af8fd568
|
@ -1327,10 +1327,14 @@ llvm::DIType CGDebugInfo::CreateType(const ObjCInterfaceType *Ty,
|
||||||
SourceLocation Loc = PD->getLocation();
|
SourceLocation Loc = PD->getLocation();
|
||||||
llvm::DIFile PUnit = getOrCreateFile(Loc);
|
llvm::DIFile PUnit = getOrCreateFile(Loc);
|
||||||
unsigned PLine = getLineNumber(Loc);
|
unsigned PLine = getLineNumber(Loc);
|
||||||
|
ObjCMethodDecl *Getter = PD->getGetterMethodDecl();
|
||||||
|
ObjCMethodDecl *Setter = PD->getSetterMethodDecl();
|
||||||
llvm::MDNode *PropertyNode =
|
llvm::MDNode *PropertyNode =
|
||||||
DBuilder.createObjCProperty(PD->getName(),
|
DBuilder.createObjCProperty(PD->getName(),
|
||||||
PUnit, PLine,
|
PUnit, PLine,
|
||||||
|
(Getter && Getter->isImplicit()) ? "" :
|
||||||
getSelectorName(PD->getGetterName()),
|
getSelectorName(PD->getGetterName()),
|
||||||
|
(Setter && Setter->isImplicit()) ? "" :
|
||||||
getSelectorName(PD->getSetterName()),
|
getSelectorName(PD->getSetterName()),
|
||||||
PD->getPropertyAttributes(),
|
PD->getPropertyAttributes(),
|
||||||
getOrCreateType(PD->getType(), PUnit));
|
getOrCreateType(PD->getType(), PUnit));
|
||||||
|
@ -1388,13 +1392,17 @@ llvm::DIType CGDebugInfo::CreateType(const ObjCInterfaceType *Ty,
|
||||||
SourceLocation Loc = PD->getLocation();
|
SourceLocation Loc = PD->getLocation();
|
||||||
llvm::DIFile PUnit = getOrCreateFile(Loc);
|
llvm::DIFile PUnit = getOrCreateFile(Loc);
|
||||||
unsigned PLine = getLineNumber(Loc);
|
unsigned PLine = getLineNumber(Loc);
|
||||||
PropertyNode =
|
ObjCMethodDecl *Getter = PD->getGetterMethodDecl();
|
||||||
DBuilder.createObjCProperty(PD->getName(),
|
ObjCMethodDecl *Setter = PD->getSetterMethodDecl();
|
||||||
PUnit, PLine,
|
PropertyNode =
|
||||||
|
DBuilder.createObjCProperty(PD->getName(),
|
||||||
|
PUnit, PLine,
|
||||||
|
(Getter && Getter->isImplicit()) ? "" :
|
||||||
getSelectorName(PD->getGetterName()),
|
getSelectorName(PD->getGetterName()),
|
||||||
|
(Setter && Setter->isImplicit()) ? "" :
|
||||||
getSelectorName(PD->getSetterName()),
|
getSelectorName(PD->getSetterName()),
|
||||||
PD->getPropertyAttributes(),
|
PD->getPropertyAttributes(),
|
||||||
getOrCreateType(PD->getType(),PUnit));
|
getOrCreateType(PD->getType(), PUnit));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
// RUN: %clang_cc1 -masm-verbose -S -g %s -o - | FileCheck %s
|
// RUN: %clang_cc1 -masm-verbose -S -g %s -o - | FileCheck %s
|
||||||
|
|
||||||
// CHECK: AT_APPLE_property_name
|
// CHECK: AT_APPLE_property_name
|
||||||
// CHECK: AT_APPLE_property_getter
|
|
||||||
// CHECK: AT_APPLE_property_setter
|
|
||||||
// CHECK: AT_APPLE_property_attribute
|
// CHECK: AT_APPLE_property_attribute
|
||||||
// CHECK: AT_APPLE_property
|
// CHECK: AT_APPLE_property
|
||||||
@interface I1 {
|
@interface I1 {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// RUN: %clang_cc1 -S -emit-llvm -g %s -o - | FileCheck %s
|
// 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
|
@interface I1
|
||||||
@property int p1;
|
@property int p1;
|
||||||
@end
|
@end
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
// RUN: %clang_cc1 -fobjc-default-synthesize-properties -masm-verbose -S -g %s -o - | FileCheck %s
|
// RUN: %clang_cc1 -fobjc-default-synthesize-properties -masm-verbose -S -g %s -o - | FileCheck %s
|
||||||
|
|
||||||
// CHECK: AT_APPLE_property_name
|
// CHECK: AT_APPLE_property_name
|
||||||
// CHECK: AT_APPLE_property_getter
|
|
||||||
// CHECK: AT_APPLE_property_setter
|
|
||||||
// CHECK: AT_APPLE_property_attribute
|
// CHECK: AT_APPLE_property_attribute
|
||||||
// CHECK: AT_APPLE_property
|
// CHECK: AT_APPLE_property
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче