]> granicus.if.org Git - clang/commitdiff
Fix a call to std::unique to actually discard the trailing (junk) elements.
authorJames Dennett <jdennett@google.com>
Mon, 6 Apr 2015 21:09:24 +0000 (21:09 +0000)
committerJames Dennett <jdennett@google.com>
Mon, 6 Apr 2015 21:09:24 +0000 (21:09 +0000)
Found by inspection.  (No other instances of this problem were found.)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@234221 91177308-0d34-0410-b5e6-96231b3b80d8

utils/TableGen/NeonEmitter.cpp

index d243672119e8916f2bd051dedad9a93711af10d3..d4822c993afef4d23cfe80868ecbecdbcd05e46c 100644 (file)
@@ -1938,7 +1938,8 @@ void NeonEmitter::createIntrinsic(Record *R,
   }
 
   std::sort(NewTypeSpecs.begin(), NewTypeSpecs.end());
-  std::unique(NewTypeSpecs.begin(), NewTypeSpecs.end());
+  NewTypeSpecs.erase(std::unique(NewTypeSpecs.begin(), NewTypeSpecs.end()),
+                    NewTypeSpecs.end());
 
   for (auto &I : NewTypeSpecs) {
     Intrinsic *IT = new Intrinsic(R, Name, Proto, I.first, I.second, CK, Body,