Simplify CXXScopeSpec a lot. No more weird SmallVector-like hacks here

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67800 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/SemaCXXScopeSpec.cpp b/lib/Sema/SemaCXXScopeSpec.cpp
index ca864a2..8fb2811 100644
--- a/lib/Sema/SemaCXXScopeSpec.cpp
+++ b/lib/Sema/SemaCXXScopeSpec.cpp
@@ -25,7 +25,7 @@
     return 0;
 
   NestedNameSpecifier *NNS 
-    = static_cast<NestedNameSpecifier *>(SS.getCurrentScopeRep());
+    = static_cast<NestedNameSpecifier *>(SS.getScopeRep());
   if (NNS->isDependent())
     return 0;
 
@@ -57,7 +57,7 @@
     return false;
 
   NestedNameSpecifier *NNS 
-    = static_cast<NestedNameSpecifier *>(SS.getCurrentScopeRep());
+    = static_cast<NestedNameSpecifier *>(SS.getScopeRep());
   return NNS->isDependent();
 }
 
@@ -111,7 +111,7 @@
                                                     SourceLocation CCLoc,
                                                     IdentifierInfo &II) {
   NestedNameSpecifier *Prefix 
-    = static_cast<NestedNameSpecifier *>(SS.getCurrentScopeRep());
+    = static_cast<NestedNameSpecifier *>(SS.getScopeRep());
 
   // If the prefix is already dependent, there is no name lookup to
   // perform. Just build the resulting nested-name-specifier.
@@ -173,7 +173,7 @@
                                                     SourceRange TypeRange,
                                                     SourceLocation CCLoc) {
   NestedNameSpecifier *Prefix 
-    = static_cast<NestedNameSpecifier *>(SS.getCurrentScopeRep());
+    = static_cast<NestedNameSpecifier *>(SS.getScopeRep());
   return NestedNameSpecifier::Create(Context, Prefix, /*FIXME:*/false,
                                 QualType::getFromOpaquePtr(Ty).getTypePtr());
 }
diff --git a/lib/Sema/SemaExpr.cpp b/lib/Sema/SemaExpr.cpp
index 288b617..92a4de0 100644
--- a/lib/Sema/SemaExpr.cpp
+++ b/lib/Sema/SemaExpr.cpp
@@ -442,7 +442,7 @@
   if (SS && !SS->isEmpty()) {
     return new (Context) QualifiedDeclRefExpr(D, Ty, Loc, TypeDependent, 
                                               ValueDependent, SS->getRange(),
-                  static_cast<NestedNameSpecifier *>(SS->getCurrentScopeRep()));
+                  static_cast<NestedNameSpecifier *>(SS->getScopeRep()));
   } else
     return new (Context) DeclRefExpr(D, Ty, Loc, TypeDependent, ValueDependent);
 }
@@ -617,7 +617,7 @@
   if (SS && isDependentScopeSpecifier(*SS)) {
     return Owned(new (Context) UnresolvedDeclRefExpr(Name, Context.DependentTy,
                                                      Loc, SS->getRange(), 
-                static_cast<NestedNameSpecifier *>(SS->getCurrentScopeRep())));
+                static_cast<NestedNameSpecifier *>(SS->getScopeRep())));
   }
 
   LookupResult Lookup = LookupParsedName(S, SS, Name, LookupOrdinaryName,
diff --git a/lib/Sema/SemaType.cpp b/lib/Sema/SemaType.cpp
index 0780ad8..f14eb65 100644
--- a/lib/Sema/SemaType.cpp
+++ b/lib/Sema/SemaType.cpp
@@ -1102,6 +1102,6 @@
     return T;
   
   NestedNameSpecifier *NNS
-    = static_cast<NestedNameSpecifier *>(SS.getCurrentScopeRep());
+    = static_cast<NestedNameSpecifier *>(SS.getScopeRep());
   return Context.getQualifiedNameType(NNS, T);
 }