r234221 - Fix a call to std::unique to actually discard the trailing (junk) elements.
James Dennett
jdennett at google.com
Mon Apr 6 14:09:24 PDT 2015
Author: jdennett
Date: Mon Apr 6 16:09:24 2015
New Revision: 234221
URL: http://llvm.org/viewvc/llvm-project?rev=234221&view=rev
Log:
Fix a call to std::unique to actually discard the trailing (junk) elements.
Found by inspection. (No other instances of this problem were found.)
Modified:
cfe/trunk/utils/TableGen/NeonEmitter.cpp
Modified: cfe/trunk/utils/TableGen/NeonEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/utils/TableGen/NeonEmitter.cpp?rev=234221&r1=234220&r2=234221&view=diff
==============================================================================
--- cfe/trunk/utils/TableGen/NeonEmitter.cpp (original)
+++ cfe/trunk/utils/TableGen/NeonEmitter.cpp Mon Apr 6 16:09:24 2015
@@ -1938,7 +1938,8 @@ void NeonEmitter::createIntrinsic(Record
}
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,
More information about the cfe-commits
mailing list