Move a method inline

llvm-svn: 38639
This commit is contained in:
Chris Lattner 2006-07-03 06:05:41 +00:00
parent a78a97e82f
commit d7de629c32
2 changed files with 3 additions and 11 deletions

View File

@ -139,16 +139,6 @@ void Preprocessor::Diag(SourceLocation Loc, unsigned DiagID,
Diags.Report(Loc, DiagID, Msg);
}
void Preprocessor::Diag(const LexerToken &Tok, unsigned DiagID,
const std::string &Msg) {
// If we are in a '#if 0' block, don't emit any diagnostics for notes,
// warnings or extensions.
if (isSkipping() && Diagnostic::isNoteWarningOrExtension(DiagID))
return;
Diag(Tok.getLocation(), DiagID, Msg);
}
void Preprocessor::DumpToken(const LexerToken &Tok, bool DumpFlags) const {
std::cerr << tok::getTokenName(Tok.getKind()) << " '"

View File

@ -332,8 +332,10 @@ public:
/// Diag - Forwarding function for diagnostics. This emits a diagnostic at
/// the specified LexerToken's location, translating the token's start
/// position in the current buffer into a SourcePosition object for rendering.
void Diag(const LexerToken &Tok, unsigned DiagID, const std::string &Msg="");
void Diag(SourceLocation Loc, unsigned DiagID, const std::string &Msg="");
void Diag(const LexerToken &Tok, unsigned DiagID, const std::string &Msg="") {
Diag(Tok.getLocation(), DiagID, Msg);
}
/// getSpelling() - Return the 'spelling' of the Tok token. The spelling of a
/// token is the characters used to represent the token in the source file