Modified the internals of Diagnostic and DiagnosticClient to use
SourceManager*'s instead of SourceManager&'s. This allows the client specify a
NULL SourceManager when using a default constructed SourceLocation. Thus the
SourceManager can be NULL when the SourceLocation's isValid() == false.

The interface to most clients of Diagnostic remains the same.
Diagnostic::Report() is overload to either accept a SourceLocation and a
SourceManager&, or neither. Thus clients that do not have a SourceManager
cannot specify a SourceLocation.

Modified TextDiagnostics* to use this new interface.
Modified the driver to not passed in SourceManager when warning about "-I-".


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44887 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/Driver/TextDiagnostics.cpp b/Driver/TextDiagnostics.cpp
index 46e535d..052ea6b 100644
--- a/Driver/TextDiagnostics.cpp
+++ b/Driver/TextDiagnostics.cpp
@@ -41,12 +41,12 @@
 
 bool TextDiagnostics::IgnoreDiagnostic(Diagnostic::Level Level,
                                        SourceLocation Pos,
-                                       SourceManager& SourceMgr) {
+                                       SourceManager* SourceMgr) {
   if (Pos.isValid()) {
     // If this is a warning or note, and if it a system header, suppress the
     // diagnostic.
     if (Level == Diagnostic::Warning || Level == Diagnostic::Note) {
-      if (const FileEntry *F = SourceMgr.getFileEntryForLoc(Pos)) {
+      if (const FileEntry *F = SourceMgr->getFileEntryForLoc(Pos)) {
         DirectoryLookup::DirType DirInfo = TheHeaderSearch->getFileDirFlavor(F);
         if (DirInfo == DirectoryLookup::SystemHeaderDir ||
             DirInfo == DirectoryLookup::ExternCSystemHeaderDir)