diff options
Diffstat (limited to 'include/clang/Index/USRGeneration.h')
-rw-r--r-- | include/clang/Index/USRGeneration.h | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/include/clang/Index/USRGeneration.h b/include/clang/Index/USRGeneration.h index 1ece321746a60..f1389ecc9593b 100644 --- a/include/clang/Index/USRGeneration.h +++ b/include/clang/Index/USRGeneration.h @@ -14,10 +14,13 @@ #include "llvm/ADT/StringRef.h" namespace clang { +class ASTContext; class Decl; class MacroDefinitionRecord; +class Module; class SourceLocation; class SourceManager; +class QualType; namespace index { @@ -70,8 +73,30 @@ bool generateUSRForMacro(const MacroDefinitionRecord *MD, bool generateUSRForMacro(StringRef MacroName, SourceLocation Loc, const SourceManager &SM, SmallVectorImpl<char> &Buf); +/// Generates a USR for a type. +/// +/// \return true on error, false on success. +bool generateUSRForType(QualType T, ASTContext &Ctx, SmallVectorImpl<char> &Buf); + +/// Generate a USR for a module, including the USR prefix. +/// \returns true on error, false on success. +bool generateFullUSRForModule(const Module *Mod, raw_ostream &OS); + +/// Generate a USR for a top-level module name, including the USR prefix. +/// \returns true on error, false on success. +bool generateFullUSRForTopLevelModuleName(StringRef ModName, raw_ostream &OS); + +/// Generate a USR fragment for a module. +/// \returns true on error, false on success. +bool generateUSRFragmentForModule(const Module *Mod, raw_ostream &OS); + +/// Generate a USR fragment for a module name. +/// \returns true on error, false on success. +bool generateUSRFragmentForModuleName(StringRef ModName, raw_ostream &OS); + + } // namespace index } // namespace clang -#endif // LLVM_CLANG_IDE_USRGENERATION_H +#endif // LLVM_CLANG_INDEX_USRGENERATION_H |