summaryrefslogtreecommitdiffstats
path: root/clang/Driver/ASTConsumers.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2007-12-11 21:27:55 +0000
committerTed Kremenek <kremenek@apple.com>2007-12-11 21:27:55 +0000
commitd4e5fbacab6d93e5a2c6d2a5ad5645b972c54bea (patch)
treed62c11fc6fb1d4a88cf3a2b6fc17efd40eeec16a /clang/Driver/ASTConsumers.cpp
parentf24dd1c1eb0730c6265f5fed2fde4edf38472c7b (diff)
downloadbcm5719-llvm-d4e5fbacab6d93e5a2c6d2a5ad5645b972c54bea.tar.gz
bcm5719-llvm-d4e5fbacab6d93e5a2c6d2a5ad5645b972c54bea.zip
Mega-patch: ripped SourceManager out of Diagnostic/DiagnosticClient. Now
SourceManager is passed by reference, allowing the SourceManager to be associated with a specific translation unit, and not the entire execution of the driver. Modified all users of Diagnostics to comply with this new interface. Integrated SourceManager as a member variable of TargetInfo. TargetInfo will eventually be associated with a single translation unit (just like SourceManager). Made the SourceManager reference in ASTContext private. Provided accessor getSourceManager() for clients to use instead. Modified clients to comply with new interface. llvm-svn: 44878
Diffstat (limited to 'clang/Driver/ASTConsumers.cpp')
-rw-r--r--clang/Driver/ASTConsumers.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/Driver/ASTConsumers.cpp b/clang/Driver/ASTConsumers.cpp
index 5cd3f77562b..85140bc0602 100644
--- a/clang/Driver/ASTConsumers.cpp
+++ b/clang/Driver/ASTConsumers.cpp
@@ -356,7 +356,7 @@ namespace {
ASTDumper() : DeclPrinter() {}
void Initialize(ASTContext &Context, unsigned MainFileID) {
- SM = &Context.SourceMgr;
+ SM = &Context.getSourceManager();
}
virtual void HandleTopLevelDecl(Decl *D) {
@@ -400,7 +400,7 @@ namespace {
SourceManager *SM;
public:
void Initialize(ASTContext &Context, unsigned MainFileID) {
- SM = &Context.SourceMgr;
+ SM = &Context.getSourceManager();
}
virtual void HandleTopLevelDecl(Decl *D) {
@@ -482,7 +482,7 @@ namespace {
SourceManager *SM;
public:
virtual void Initialize(ASTContext &Context, unsigned MainFileID) {
- SM = &Context.SourceMgr;
+ SM = &Context.getSourceManager();
}
virtual void VisitCFG(CFG& C) {
OpenPOWER on IntegriCloud