summaryrefslogtreecommitdiffstats
path: root/clang/tools/driver/driver.cpp
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2010-11-18 20:06:41 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2010-11-18 20:06:41 +0000
commitd00406486421143c5e4eb79f9ce97e30442b1ab2 (patch)
treeeb2ff8461358578c978f17ddfa7f597b9f6a1022 /clang/tools/driver/driver.cpp
parent4fadc5b20a3afbad542e0841692dc851d0507136 (diff)
downloadbcm5719-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/tools/driver/driver.cpp')
-rw-r--r--clang/tools/driver/driver.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/tools/driver/driver.cpp b/clang/tools/driver/driver.cpp
index c1172817ed9..57765fed803 100644
--- a/clang/tools/driver/driver.cpp
+++ b/clang/tools/driver/driver.cpp
@@ -288,7 +288,8 @@ int main(int argc_, const char **argv_) {
TextDiagnosticPrinter *DiagClient
= new TextDiagnosticPrinter(llvm::errs(), DiagnosticOptions());
DiagClient->setPrefix(Path.getBasename());
- Diagnostic Diags(DiagClient);
+ llvm::IntrusiveRefCntPtr<DiagnosticIDs> DiagID(new DiagnosticIDs());
+ Diagnostic Diags(DiagID, DiagClient);
#ifdef CLANG_IS_PRODUCTION
const bool IsProduction = true;
OpenPOWER on IntegriCloud