TargetInfo no longer includes a reference to SourceManager.

Moved all clients of Diagnostics to use FullSourceLoc instead of SourceLocation.
Added many utility methods to FullSourceLoc to provide shorthand for:

    FullLoc.getManager().someMethod(FullLoc.getLocation());
    
instead we have:

    FullLoc.someMethod();
    
Modified TextDiagnostics (and related classes) to use this short-hand.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44957 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/Sema/Sema.cpp b/Sema/Sema.cpp
index 5ec5fa7..3f5b24f 100644
--- a/Sema/Sema.cpp
+++ b/Sema/Sema.cpp
@@ -118,54 +118,51 @@
 //===----------------------------------------------------------------------===//
 
 bool Sema::Diag(SourceLocation Loc, unsigned DiagID) {
-  PP.getDiagnostics().Report(Loc, DiagID, PP.getSourceManager());
+  PP.getDiagnostics().Report(PP.getFullLoc(Loc), DiagID);
   return true;
 }
 
 bool Sema::Diag(SourceLocation Loc, unsigned DiagID, const std::string &Msg) {
-  PP.getDiagnostics().Report(Loc, DiagID, PP.getSourceManager(), &Msg, 1);
+  PP.getDiagnostics().Report(PP.getFullLoc(Loc), DiagID,  &Msg, 1);
   return true;
 }
 
 bool Sema::Diag(SourceLocation Loc, unsigned DiagID, const std::string &Msg1,
                 const std::string &Msg2) {
   std::string MsgArr[] = { Msg1, Msg2 };
-  PP.getDiagnostics().Report(Loc, DiagID, PP.getSourceManager(), MsgArr, 2);
+  PP.getDiagnostics().Report(PP.getFullLoc(Loc), DiagID,  MsgArr, 2);
   return true;
 }
 
 bool Sema::Diag(SourceLocation Loc, unsigned DiagID, SourceRange Range) {
-  PP.getDiagnostics().Report(Loc, DiagID, PP.getSourceManager(), 0,0, &Range,1);
+  PP.getDiagnostics().Report(PP.getFullLoc(Loc), DiagID, 0, 0, &Range,1);
   return true;
 }
 
 bool Sema::Diag(SourceLocation Loc, unsigned DiagID, const std::string &Msg,
                 SourceRange Range) {
-  PP.getDiagnostics().Report(Loc,DiagID,PP.getSourceManager(),&Msg,1,&Range,1);
+  PP.getDiagnostics().Report(PP.getFullLoc(Loc), DiagID, &Msg, 1, &Range,1);
   return true;
 }
 
 bool Sema::Diag(SourceLocation Loc, unsigned DiagID, const std::string &Msg1,
                 const std::string &Msg2, SourceRange Range) {
   std::string MsgArr[] = { Msg1, Msg2 };
-  PP.getDiagnostics().Report(Loc,DiagID,PP.getSourceManager(),
-                             MsgArr,2,&Range,1);
+  PP.getDiagnostics().Report(PP.getFullLoc(Loc), DiagID, MsgArr, 2, &Range, 1);
   return true;
 }
 
 bool Sema::Diag(SourceLocation Loc, unsigned DiagID,
                 SourceRange R1, SourceRange R2) {
   SourceRange RangeArr[] = { R1, R2 };
-  PP.getDiagnostics().Report(Loc, DiagID, PP.getSourceManager(),
-                             0, 0, RangeArr, 2);
+  PP.getDiagnostics().Report(PP.getFullLoc(Loc), DiagID, 0, 0, RangeArr, 2);
   return true;
 }
 
 bool Sema::Diag(SourceLocation Loc, unsigned DiagID, const std::string &Msg,
                 SourceRange R1, SourceRange R2) {
   SourceRange RangeArr[] = { R1, R2 };
-  PP.getDiagnostics().Report(Loc, DiagID, PP.getSourceManager(), &Msg,
-                             1, RangeArr, 2);
+  PP.getDiagnostics().Report(PP.getFullLoc(Loc), DiagID,  &Msg, 1, RangeArr, 2);
   return true;
 }
 
@@ -173,8 +170,7 @@
                 const std::string &Msg2, SourceRange R1, SourceRange R2) {
   std::string MsgArr[] = { Msg1, Msg2 };
   SourceRange RangeArr[] = { R1, R2 };
-  PP.getDiagnostics().Report(Range, DiagID, PP.getSourceManager(), MsgArr, 2,
-                             RangeArr, 2);
+  PP.getDiagnostics().Report(PP.getFullLoc(Range),DiagID, MsgArr,2,RangeArr, 2);
   return true;
 }