eliminate FullSourceLoc::getLocation() now that FullSourceLoc
*is* the location.  This eliminates some weird X.getLocation().getLocation()'s.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62376 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/include/clang/Basic/SourceLocation.h b/include/clang/Basic/SourceLocation.h
index b3cb787..da7ea25 100644
--- a/include/clang/Basic/SourceLocation.h
+++ b/include/clang/Basic/SourceLocation.h
@@ -218,8 +218,6 @@
   explicit FullSourceLoc(SourceLocation Loc, SourceManager &SM) 
     : SourceLocation(Loc), SrcMgr(&SM) {}
     
-  SourceLocation getLocation() const { return *this; }
-  
   SourceManager& getManager() {
     assert (SrcMgr && "SourceManager is NULL.");
     return *SrcMgr;
diff --git a/lib/Driver/HTMLDiagnostics.cpp b/lib/Driver/HTMLDiagnostics.cpp
index 7f20e1a..f335396 100644
--- a/lib/Driver/HTMLDiagnostics.cpp
+++ b/lib/Driver/HTMLDiagnostics.cpp
@@ -133,9 +133,9 @@
     FullSourceLoc L = I->getLocation().getInstantiationLoc();
     
     if (!FileIDInitialized) {
-      FileID = SMgr.getCanonicalFileID(L.getLocation());
+      FileID = SMgr.getCanonicalFileID(L);
       FileIDInitialized = true;
-    } else if (SMgr.getCanonicalFileID(L.getLocation()) != FileID)
+    } else if (SMgr.getCanonicalFileID(L) != FileID)
       return; // FIXME: Emit a warning?
     
     // Check the source ranges.
@@ -339,11 +339,11 @@
   
   SourceManager& SM = R.getSourceMgr();
   FullSourceLoc LPos = Pos.getInstantiationLoc();
-  unsigned FileID = SM.getCanonicalFileID(LPos.getLocation());
+  unsigned FileID = SM.getCanonicalFileID(LPos);
 
   assert (&LPos.getManager() == &SM && "SourceManagers are different!");
   
-  if (SM.getCanonicalFileID(LPos.getLocation()) != BugFileID)
+  if (SM.getCanonicalFileID(LPos) != BugFileID)
     return;
   
   const llvm::MemoryBuffer *Buf = SM.getBuffer(FileID);
@@ -351,7 +351,6 @@
   
   // Compute the column number.  Rewind from the current position to the start
   // of the line.
-  
   unsigned ColNo = LPos.getColumnNumber();
   const char *TokInstantiationPtr = LPos.getCharacterData();
   const char *LineStart = TokInstantiationPtr-ColNo;
diff --git a/lib/Driver/PlistDiagnostics.cpp b/lib/Driver/PlistDiagnostics.cpp
index 7719930..1428028 100644
--- a/lib/Driver/PlistDiagnostics.cpp
+++ b/lib/Driver/PlistDiagnostics.cpp
@@ -109,7 +109,7 @@
   FullSourceLoc L = P.getLocation();
 
   Indent(o, indent) << "<key>location</key>\n";
-  EmitLocation(o, SM, L.getLocation(), FM, indent);
+  EmitLocation(o, SM, L, FM, indent);
 
   // Output the ranges (if any).
   PathDiagnosticPiece::range_iterator RI = P.ranges_begin(),
@@ -174,7 +174,7 @@
   llvm::SmallVector<unsigned, 10> Fids;
   
   for (PathDiagnostic::const_iterator I=D->begin(), E=D->end(); I != E; ++I) {
-    AddFID(FM, Fids, SM, I->getLocation().getLocation());
+    AddFID(FM, Fids, SM, I->getLocation());
 
     for (PathDiagnosticPiece::range_iterator RI=I->ranges_begin(),
                                              RE=I->ranges_end(); RI!=RE; ++RI) {      
diff --git a/lib/Driver/TextDiagnosticBuffer.cpp b/lib/Driver/TextDiagnosticBuffer.cpp
index 5032cdb..279a6b9 100644
--- a/lib/Driver/TextDiagnosticBuffer.cpp
+++ b/lib/Driver/TextDiagnosticBuffer.cpp
@@ -26,13 +26,13 @@
   switch (Level) {
   default: assert(0 && "Diagnostic not handled during diagnostic buffering!");
   case Diagnostic::Note:
-    Notes.push_back(std::make_pair(Info.getLocation().getLocation(), Str));
+    Notes.push_back(std::make_pair(Info.getLocation(), Str));
     break;
   case Diagnostic::Warning:
-    Warnings.push_back(std::make_pair(Info.getLocation().getLocation(), Str));
+    Warnings.push_back(std::make_pair(Info.getLocation(), Str));
     break;
   case Diagnostic::Error:
-    Errors.push_back(std::make_pair(Info.getLocation().getLocation(), Str));
+    Errors.push_back(std::make_pair(Info.getLocation(), Str));
     break;
   }
 }
diff --git a/lib/Driver/TextDiagnosticPrinter.cpp b/lib/Driver/TextDiagnosticPrinter.cpp
index 1f98ef9..8523723 100644
--- a/lib/Driver/TextDiagnosticPrinter.cpp
+++ b/lib/Driver/TextDiagnosticPrinter.cpp
@@ -105,7 +105,7 @@
   if (Pos.isValid()) {
     FullSourceLoc LPos = Pos.getInstantiationLoc();
     LineNo = LPos.getLineNumber();
-    FileID = LPos.getLocation().getFileID();
+    FileID = LPos.getFileID();
     
     // First, if this diagnostic is not in the main file, print out the
     // "included from" lines.