summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2016-03-04 07:17:43 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2016-03-04 07:17:43 +0000
commit9c9986738633640d9ac1e38d6c54948a9245c3c1 (patch)
tree42bcacb8e66e69bedf1f7da0ab2003cdbdeaa635 /clang/lib
parent4415bdbdc3afdb3c0a70afbfb7f74d39486b4a98 (diff)
downloadbcm5719-llvm-9c9986738633640d9ac1e38d6c54948a9245c3c1.tar.gz
bcm5719-llvm-9c9986738633640d9ac1e38d6c54948a9245c3c1.zip
[index] In ObjC++ handle objc type parameters for function USRs.
llvm-svn: 262693
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/Index/USRGeneration.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/clang/lib/Index/USRGeneration.cpp b/clang/lib/Index/USRGeneration.cpp
index c15838c76c6..85478265c06 100644
--- a/clang/lib/Index/USRGeneration.cpp
+++ b/clang/lib/Index/USRGeneration.cpp
@@ -663,6 +663,11 @@ void USRGenerator::VisitType(QualType T) {
T = PT->getPointeeType();
continue;
}
+ if (const ObjCObjectPointerType *OPT = T->getAs<ObjCObjectPointerType>()) {
+ Out << '*';
+ T = OPT->getPointeeType();
+ continue;
+ }
if (const RValueReferenceType *RT = T->getAs<RValueReferenceType>()) {
Out << "&&";
T = RT->getPointeeType();
@@ -697,6 +702,18 @@ void USRGenerator::VisitType(QualType T) {
VisitTagDecl(TT->getDecl());
return;
}
+ if (const ObjCInterfaceType *OIT = T->getAs<ObjCInterfaceType>()) {
+ Out << '$';
+ VisitObjCInterfaceDecl(OIT->getDecl());
+ return;
+ }
+ if (const ObjCObjectType *OIT = T->getAs<ObjCObjectType>()) {
+ Out << 'Q';
+ VisitType(OIT->getBaseType());
+ for (auto *Prot : OIT->getProtocols())
+ VisitObjCProtocolDecl(Prot);
+ return;
+ }
if (const TemplateTypeParmType *TTP = T->getAs<TemplateTypeParmType>()) {
Out << 't' << TTP->getDepth() << '.' << TTP->getIndex();
return;
OpenPOWER on IntegriCloud