summaryrefslogtreecommitdiffstats
path: root/clang/lib/Index/USRGeneration.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Index/USRGeneration.cpp')
-rw-r--r--clang/lib/Index/USRGeneration.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/clang/lib/Index/USRGeneration.cpp b/clang/lib/Index/USRGeneration.cpp
index b75aa252175..2c3c1867028 100644
--- a/clang/lib/Index/USRGeneration.cpp
+++ b/clang/lib/Index/USRGeneration.cpp
@@ -1105,6 +1105,17 @@ bool clang::index::generateUSRForMacro(StringRef MacroName, SourceLocation Loc,
return false;
}
+bool clang::index::generateUSRForType(QualType T, ASTContext &Ctx,
+ SmallVectorImpl<char> &Buf) {
+ if (T.isNull())
+ return true;
+ T = T.getCanonicalType();
+
+ USRGenerator UG(&Ctx, Buf);
+ UG.VisitType(T);
+ return UG.ignoreResults();
+}
+
bool clang::index::generateFullUSRForModule(const Module *Mod,
raw_ostream &OS) {
if (!Mod->Parent)
OpenPOWER on IntegriCloud