summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGDebugInfo.cpp
diff options
context:
space:
mode:
authorAdrian Prantl <aprantl@apple.com>2013-05-17 23:49:10 +0000
committerAdrian Prantl <aprantl@apple.com>2013-05-17 23:49:10 +0000
commit6e785ec019fd75df80827afa7b9529877f6fe5d6 (patch)
treefc313ddc6000744f04049b4a33e50f0771e4c1cf /clang/lib/CodeGen/CGDebugInfo.cpp
parent97b08c404cb702c0c3d1c1beea58576245e80698 (diff)
downloadbcm5719-llvm-6e785ec019fd75df80827afa7b9529877f6fe5d6.tar.gz
bcm5719-llvm-6e785ec019fd75df80827afa7b9529877f6fe5d6.zip
ObjC Debug Info: Emit the correct method names for accessors for
properties declared in a protocol. rdar://problem/13798000 llvm-svn: 182176
Diffstat (limited to 'clang/lib/CodeGen/CGDebugInfo.cpp')
-rw-r--r--clang/lib/CodeGen/CGDebugInfo.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp
index 14c92e6669b..a0187186ff8 100644
--- a/clang/lib/CodeGen/CGDebugInfo.cpp
+++ b/clang/lib/CodeGen/CGDebugInfo.cpp
@@ -161,6 +161,13 @@ StringRef CGDebugInfo::getObjCMethodName(const ObjCMethodDecl *OMD) {
dyn_cast<const ObjCCategoryImplDecl>(DC)){
OS << ((const NamedDecl *)OCD)->getIdentifier()->getNameStart() << '(' <<
OCD->getIdentifier()->getNameStart() << ')';
+ } else if (isa<const ObjCProtocolDecl>(DC)) {
+ // We can extract the type of the class from the self pointer.
+ if (ImplicitParamDecl* SelfDecl = OMD->getSelfDecl()) {
+ QualType ClassTy =
+ cast<ObjCObjectPointerType>(SelfDecl->getType())->getPointeeType();
+ ClassTy.print(OS, PrintingPolicy(LangOptions()));
+ }
}
OS << ' ' << OMD->getSelector().getAsString() << ']';
OpenPOWER on IntegriCloud