diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2010-11-18 20:06:41 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2010-11-18 20:06:41 +0000 |
commit | d00406486421143c5e4eb79f9ce97e30442b1ab2 (patch) | |
tree | eb2ff8461358578c978f17ddfa7f597b9f6a1022 /clang/lib/Frontend/CompilerInstance.cpp | |
parent | 4fadc5b20a3afbad542e0841692dc851d0507136 (diff) | |
download | bcm5719-llvm-d00406486421143c5e4eb79f9ce97e30442b1ab2.tar.gz bcm5719-llvm-d00406486421143c5e4eb79f9ce97e30442b1ab2.zip |
Refactoring of Diagnostic class.
-Move the stuff of Diagnostic related to creating/querying diagnostic IDs into a new DiagnosticIDs class.
-DiagnosticIDs can be shared among multiple Diagnostics for multiple translation units.
-The rest of the state in Diagnostic object is considered related and tied to one translation unit.
-Have Diagnostic point to the SourceManager that is related with. Diagnostic can now accept just a
SourceLocation instead of a FullSourceLoc.
-Reflect the changes to various interfaces.
llvm-svn: 119730
Diffstat (limited to 'clang/lib/Frontend/CompilerInstance.cpp')
-rw-r--r-- | clang/lib/Frontend/CompilerInstance.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Frontend/CompilerInstance.cpp b/clang/lib/Frontend/CompilerInstance.cpp index 7cfcd1c4198..dafbef1824b 100644 --- a/clang/lib/Frontend/CompilerInstance.cpp +++ b/clang/lib/Frontend/CompilerInstance.cpp @@ -122,7 +122,8 @@ llvm::IntrusiveRefCntPtr<Diagnostic> CompilerInstance::createDiagnostics(const DiagnosticOptions &Opts, int Argc, const char* const *Argv, DiagnosticClient *Client) { - llvm::IntrusiveRefCntPtr<Diagnostic> Diags(new Diagnostic()); + llvm::IntrusiveRefCntPtr<DiagnosticIDs> DiagID(new DiagnosticIDs()); + llvm::IntrusiveRefCntPtr<Diagnostic> Diags(new Diagnostic(DiagID)); // Create the diagnostic client for reporting errors or for // implementing -verify. |