[cfe-commits] r66955 - in /cfe/trunk: include/clang/Lex/Preprocessor.h lib/Lex/Preprocessor.cpp
Chris Lattner
sabre at nondot.org
Fri Mar 13 14:17:43 PDT 2009
Author: lattner
Date: Fri Mar 13 16:17:43 2009
New Revision: 66955
URL: http://llvm.org/viewvc/llvm-project?rev=66955&view=rev
Log:
make Preprocessor::Diags be a pointer instead of a reference.
Modified:
cfe/trunk/include/clang/Lex/Preprocessor.h
cfe/trunk/lib/Lex/Preprocessor.cpp
Modified: cfe/trunk/include/clang/Lex/Preprocessor.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Lex/Preprocessor.h?rev=66955&r1=66954&r2=66955&view=diff
==============================================================================
--- cfe/trunk/include/clang/Lex/Preprocessor.h (original)
+++ cfe/trunk/include/clang/Lex/Preprocessor.h Fri Mar 13 16:17:43 2009
@@ -45,7 +45,7 @@
/// like the #include stack, token expansion, etc.
///
class Preprocessor {
- Diagnostic &Diags;
+ Diagnostic *Diags;
const LangOptions &Features;
TargetInfo &Target;
FileManager &FileMgr;
@@ -196,7 +196,7 @@
~Preprocessor();
- Diagnostic &getDiagnostics() const { return Diags; }
+ Diagnostic &getDiagnostics() const { return *Diags; }
const LangOptions &getLangOptions() const { return Features; }
TargetInfo &getTargetInfo() const { return Target; }
FileManager &getFileManager() const { return FileMgr; }
@@ -452,12 +452,12 @@
/// the specified Token's location, translating the token's start
/// position in the current buffer into a SourcePosition object for rendering.
DiagnosticBuilder Diag(SourceLocation Loc, unsigned DiagID) {
- return Diags.Report(FullSourceLoc(Loc, getSourceManager()), DiagID);
+ return Diags->Report(FullSourceLoc(Loc, getSourceManager()), DiagID);
}
DiagnosticBuilder Diag(const Token &Tok, unsigned DiagID) {
- return Diags.Report(FullSourceLoc(Tok.getLocation(), getSourceManager()),
- DiagID);
+ return Diags->Report(FullSourceLoc(Tok.getLocation(), getSourceManager()),
+ DiagID);
}
/// getSpelling() - Return the 'spelling' of the Tok token. The spelling of a
Modified: cfe/trunk/lib/Lex/Preprocessor.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Lex/Preprocessor.cpp?rev=66955&r1=66954&r2=66955&view=diff
==============================================================================
--- cfe/trunk/lib/Lex/Preprocessor.cpp (original)
+++ cfe/trunk/lib/Lex/Preprocessor.cpp Fri Mar 13 16:17:43 2009
@@ -49,7 +49,7 @@
TargetInfo &target, SourceManager &SM,
HeaderSearch &Headers,
IdentifierInfoLookup* IILookup)
- : Diags(diags), Features(opts), Target(target), FileMgr(Headers.getFileMgr()),
+ : Diags(&diags), Features(opts), Target(target),FileMgr(Headers.getFileMgr()),
SourceMgr(SM), HeaderInfo(Headers), Identifiers(opts, IILookup),
CurPPLexer(0), CurDirLookup(0), Callbacks(0) {
ScratchBuf = new ScratchBuffer(SourceMgr);
More information about the cfe-commits
mailing list