aboutsummaryrefslogtreecommitdiff
path: root/include/clang/Index/USRGeneration.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/clang/Index/USRGeneration.h')
-rw-r--r--include/clang/Index/USRGeneration.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/include/clang/Index/USRGeneration.h b/include/clang/Index/USRGeneration.h
index 7b0fd5063ac6..3195dee7506c 100644
--- a/include/clang/Index/USRGeneration.h
+++ b/include/clang/Index/USRGeneration.h
@@ -14,7 +14,9 @@
#include "llvm/ADT/StringRef.h"
namespace clang {
- class Decl;
+class Decl;
+class MacroDefinition;
+class SourceManager;
namespace index {
@@ -22,7 +24,7 @@ static inline StringRef getUSRSpacePrefix() {
return "c:";
}
-/// \brief Generate a USR for a Decl, including the prefix.
+/// \brief Generate a USR for a Decl, including the USR prefix.
/// \returns true if the results should be ignored, false otherwise.
bool generateUSRForDecl(const Decl *D, SmallVectorImpl<char> &Buf);
@@ -47,6 +49,12 @@ void generateUSRForObjCProperty(StringRef Prop, raw_ostream &OS);
/// \brief Generate a USR fragment for an Objective-C protocol.
void generateUSRForObjCProtocol(StringRef Prot, raw_ostream &OS);
+/// \brief Generate a USR for a macro, including the USR prefix.
+///
+/// \returns true on error, false on success.
+bool generateUSRForMacro(const MacroDefinition *MD, const SourceManager &SM,
+ SmallVectorImpl<char> &Buf);
+
} // namespace index
} // namespace clang