From: James Dennett Date: Mon, 6 Apr 2015 21:09:24 +0000 (+0000) Subject: Fix a call to std::unique to actually discard the trailing (junk) elements. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=bfab8535c000d4b12f07b2d567b6408c862b1cd2;p=clang Fix a call to std::unique to actually discard the trailing (junk) elements. 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 --- diff --git a/utils/TableGen/NeonEmitter.cpp b/utils/TableGen/NeonEmitter.cpp index d243672119..d4822c993a 100644 --- a/utils/TableGen/NeonEmitter.cpp +++ b/utils/TableGen/NeonEmitter.cpp @@ -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,