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/Parse/ParseExprCXX.cpp b/lib/Parse/ParseExprCXX.cpp
index 731f4c7..b3ec24f 100644
--- a/lib/Parse/ParseExprCXX.cpp
+++ b/lib/Parse/ParseExprCXX.cpp
@@ -36,8 +36,7 @@
          "Call sites of this function should be guarded by checking for C++");
 
   if (Tok.is(tok::annot_cxxscope)) {
-    SS.setFromAnnotationData(Tok.getAnnotationValue());
-    CXXScopeSpec::freeAnnotationData(Tok.getAnnotationValue());
+    SS.setScopeRep(Tok.getAnnotationValue());
     SS.setRange(Tok.getAnnotationRange());
     ConsumeToken();
     return true;
@@ -54,7 +53,7 @@
     // '::' - Global scope qualifier.
     SourceLocation CCLoc = ConsumeToken();
     SS.setBeginLoc(CCLoc);
-    SS.addScopeRep(Actions.ActOnCXXGlobalScopeSpecifier(CurScope, CCLoc));
+    SS.setScopeRep(Actions.ActOnCXXGlobalScopeSpecifier(CurScope, CCLoc));
     SS.setEndLoc(CCLoc);
     HasScopeSpecifier = true;
   }
@@ -80,7 +79,7 @@
       if (SS.isInvalid())
         continue;
       
-      SS.addScopeRep(
+      SS.setScopeRep(
         Actions.ActOnCXXNestedNameSpecifier(CurScope, SS, IdLoc, CCLoc, *II));
       SS.setEndLoc(CCLoc);
       continue;
@@ -165,7 +164,7 @@
           HasScopeSpecifier = true;
         }
 
-        SS.addScopeRep(
+        SS.setScopeRep(
           Actions.ActOnCXXNestedNameSpecifier(CurScope, SS, 
                                               TypeToken.getAnnotationValue(),
                                               TypeToken.getAnnotationRange(),