summaryrefslogtreecommitdiffstats
path: root/clang/lib/Index/USRGeneration.cpp
diff options
context:
space:
mode:
authorAlex Lorenz <arphaman@gmail.com>2017-04-28 09:46:36 +0000
committerAlex Lorenz <arphaman@gmail.com>2017-04-28 09:46:36 +0000
commit45c423bcdc25712f123c3161090a776640b36021 (patch)
tree1755f99c08d203dee0e5e074cf8c5d4984cb37ba /clang/lib/Index/USRGeneration.cpp
parent6f975692e5c4f038a7325a58b5b47647844f8f38 (diff)
downloadbcm5719-llvm-45c423bcdc25712f123c3161090a776640b36021.tar.gz
bcm5719-llvm-45c423bcdc25712f123c3161090a776640b36021.zip
[index] Handle vector types in USR generator
rdar://25339187 llvm-svn: 301635
Diffstat (limited to 'clang/lib/Index/USRGeneration.cpp')
-rw-r--r--clang/lib/Index/USRGeneration.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/clang/lib/Index/USRGeneration.cpp b/clang/lib/Index/USRGeneration.cpp
index ed469f677a3..044edf715fc 100644
--- a/clang/lib/Index/USRGeneration.cpp
+++ b/clang/lib/Index/USRGeneration.cpp
@@ -811,7 +811,13 @@ void USRGenerator::VisitType(QualType T) {
T = InjT->getInjectedSpecializationType();
continue;
}
-
+ if (const auto *VT = T->getAs<VectorType>()) {
+ Out << (T->isExtVectorType() ? ']' : '[');
+ Out << VT->getNumElements();
+ T = VT->getElementType();
+ continue;
+ }
+
// Unhandled type.
Out << ' ';
break;
OpenPOWER on IntegriCloud