summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-03-13 21:17:43 +0000
committerChris Lattner <sabre@nondot.org>2009-03-13 21:17:43 +0000
commit83aba00ee8864ae7dc7dc532cc45382a307ecf1c (patch)
tree02df3b5e0482d2f9f3901856b3cfaecf3ce83026
parent80c21df8eaf5c6e5552a819c093e46650d6589fe (diff)
downloadbcm5719-llvm-83aba00ee8864ae7dc7dc532cc45382a307ecf1c.tar.gz
bcm5719-llvm-83aba00ee8864ae7dc7dc532cc45382a307ecf1c.zip
make Preprocessor::Diags be a pointer instead of a reference.
llvm-svn: 66955
-rw-r--r--clang/include/clang/Lex/Preprocessor.h10
-rw-r--r--clang/lib/Lex/Preprocessor.cpp2
2 files changed, 6 insertions, 6 deletions
diff --git a/clang/include/clang/Lex/Preprocessor.h b/clang/include/clang/Lex/Preprocessor.h
index 4f5def5c516..28aad1a7bb3 100644
--- a/clang/include/clang/Lex/Preprocessor.h
+++ b/clang/include/clang/Lex/Preprocessor.h
@@ -45,7 +45,7 @@ class DirectoryLookup;
/// like the #include stack, token expansion, etc.
///
class Preprocessor {
- Diagnostic &Diags;
+ Diagnostic *Diags;
const LangOptions &Features;
TargetInfo &Target;
FileManager &FileMgr;
@@ -196,7 +196,7 @@ public:
~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 @@ public:
/// 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
diff --git a/clang/lib/Lex/Preprocessor.cpp b/clang/lib/Lex/Preprocessor.cpp
index de706440c84..38a6919be37 100644
--- a/clang/lib/Lex/Preprocessor.cpp
+++ b/clang/lib/Lex/Preprocessor.cpp
@@ -49,7 +49,7 @@ Preprocessor::Preprocessor(Diagnostic &diags, const LangOptions &opts,
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);
OpenPOWER on IntegriCloud