diff options
-rw-r--r-- | lib/CodeGen/CGDebugInfo.cpp | 18 | ||||
-rw-r--r-- | test/CodeGenObjC/debug-info-property.m | 2 | ||||
-rw-r--r-- | test/CodeGenObjC/debug-info-property3.m | 2 | ||||
-rw-r--r-- | test/CodeGenObjC/debug-info-property4.m | 2 |
4 files changed, 14 insertions, 10 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)); } } } diff --git a/test/CodeGenObjC/debug-info-property.m b/test/CodeGenObjC/debug-info-property.m index 6ed467a5bc..dd105a58bd 100644 --- a/test/CodeGenObjC/debug-info-property.m +++ b/test/CodeGenObjC/debug-info-property.m @@ -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 { diff --git a/test/CodeGenObjC/debug-info-property3.m b/test/CodeGenObjC/debug-info-property3.m index c3bf1ae262..f96ec44c6b 100644 --- a/test/CodeGenObjC/debug-info-property3.m +++ b/test/CodeGenObjC/debug-info-property3.m @@ -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 diff --git a/test/CodeGenObjC/debug-info-property4.m b/test/CodeGenObjC/debug-info-property4.m index 619813f687..386a80854c 100644 --- a/test/CodeGenObjC/debug-info-property4.m +++ b/test/CodeGenObjC/debug-info-property4.m @@ -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 |