[index] Generate class & metaclass manglings for objc
authorDave Lee <davelee.com@gmail.com>
Fri, 22 Sep 2017 16:58:57 +0000 (16:58 +0000)
committerDave Lee <davelee.com@gmail.com>
Fri, 22 Sep 2017 16:58:57 +0000 (16:58 +0000)
commit1a532c9e1dee0f898be16bf2ae84d5b798f25d28
tree9d833023c353a290d44648563475c667864d0cea
parent8c4d061562c3bf2ffcb8c0e73b41f92e034461d0
[index] Generate class & metaclass manglings for objc

Summary:
ObjC classes have two associated symbols, one for the class and one for the
metaclass.

This change overloads `CodegenNameGenerator::getAllManglings` to produce both
class and metaclass symbols.

While this function is called by `clang_Cursor_getCXXManglings`, it's only
called for CXXRecordDecl and CXXMethodDecl, and so libclang's behavior is
unchanged.

Reviewers: arphaman, abdulras, alexshap, compnerd

Reviewed By: compnerd

Subscribers: compnerd

Differential Revision: https://reviews.llvm.org/D37671

llvm-svn: 313997
clang/include/clang-c/Index.h
clang/lib/Index/CodegenNameGenerator.cpp
clang/test/Index/print-objc-manglings.m [new file with mode: 0644]
clang/tools/c-index-test/c-index-test.c
clang/tools/libclang/CIndex.cpp
clang/tools/libclang/libclang.exports