aboutsummaryrefslogtreecommitdiff
path: root/lib/Lex/Preprocessor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Lex/Preprocessor.cpp')
-rw-r--r--lib/Lex/Preprocessor.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/lib/Lex/Preprocessor.cpp b/lib/Lex/Preprocessor.cpp
index 9240a0aa7f..89073276a9 100644
--- a/lib/Lex/Preprocessor.cpp
+++ b/lib/Lex/Preprocessor.cpp
@@ -124,6 +124,26 @@ void Preprocessor::Diag(SourceLocation Loc, unsigned DiagID,
Diags.Report(getFullLoc(Loc), DiagID, &Msg, 1);
}
+void Preprocessor::Diag(SourceLocation Loc, unsigned DiagID,
+ const std::string &Msg,
+ const SourceRange &R1, const SourceRange &R2) {
+ SourceRange R[] = {R1, R2};
+ Diags.Report(getFullLoc(Loc), DiagID, &Msg, 1, R, 2);
+}
+
+
+void Preprocessor::Diag(SourceLocation Loc, unsigned DiagID,
+ const SourceRange &R) {
+ Diags.Report(getFullLoc(Loc), DiagID, 0, 0, &R, 1);
+}
+
+void Preprocessor::Diag(SourceLocation Loc, unsigned DiagID,
+ const SourceRange &R1, const SourceRange &R2) {
+ SourceRange R[] = {R1, R2};
+ Diags.Report(getFullLoc(Loc), DiagID, 0, 0, R, 2);
+}
+
+
void Preprocessor::DumpToken(const Token &Tok, bool DumpFlags) const {
llvm::cerr << tok::getTokenName(Tok.getKind()) << " '"
<< getSpelling(Tok) << "'";