diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2017-04-16 16:02:28 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2017-04-16 16:02:28 +0000 |
commit | 7442d6faa2719e4e7d33a7021c406c5a4facd74d (patch) | |
tree | c72b9241553fc9966179aba84f90f17bfa9235c3 /lib/AST/Mangle.cpp | |
parent | b52119637f743680a99710ce5fdb6646da2772af (diff) |
Diffstat (limited to 'lib/AST/Mangle.cpp')
-rw-r--r-- | lib/AST/Mangle.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/AST/Mangle.cpp b/lib/AST/Mangle.cpp index 05dd886adcefc..00d50c0e3bdf4 100644 --- a/lib/AST/Mangle.cpp +++ b/lib/AST/Mangle.cpp @@ -262,9 +262,13 @@ void MangleContext::mangleObjCMethodNameWithoutSize(const ObjCMethodDecl *MD, const ObjCContainerDecl *CD = dyn_cast<ObjCContainerDecl>(MD->getDeclContext()); assert (CD && "Missing container decl in GetNameForMethod"); - OS << (MD->isInstanceMethod() ? '-' : '+') << '[' << CD->getName(); - if (const ObjCCategoryImplDecl *CID = dyn_cast<ObjCCategoryImplDecl>(CD)) + OS << (MD->isInstanceMethod() ? '-' : '+') << '['; + if (const ObjCCategoryImplDecl *CID = dyn_cast<ObjCCategoryImplDecl>(CD)) { + OS << CID->getClassInterface()->getName(); OS << '(' << *CID << ')'; + } else { + OS << CD->getName(); + } OS << ' '; MD->getSelector().print(OS); OS << ']'; |