diff options
author | James Dennett <jdennett@google.com> | 2015-04-06 21:09:24 +0000 |
---|---|---|
committer | James Dennett <jdennett@google.com> | 2015-04-06 21:09:24 +0000 |
commit | fa24549492b845a90397d1fc315d1d77a2e2dfe9 (patch) | |
tree | 7c221dad1b0dfb09ade41ee37fa15821c257395f /clang/utils | |
parent | 198d6d53e2c348ed0d3b0a058fa3e99ef4eff60c (diff) | |
download | bcm5719-llvm-fa24549492b845a90397d1fc315d1d77a2e2dfe9.tar.gz bcm5719-llvm-fa24549492b845a90397d1fc315d1d77a2e2dfe9.zip |
Fix a call to std::unique to actually discard the trailing (junk) elements.
Found by inspection. (No other instances of this problem were found.)
llvm-svn: 234221
Diffstat (limited to 'clang/utils')
-rw-r--r-- | clang/utils/TableGen/NeonEmitter.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/utils/TableGen/NeonEmitter.cpp b/clang/utils/TableGen/NeonEmitter.cpp index d243672119e..d4822c993af 100644 --- a/clang/utils/TableGen/NeonEmitter.cpp +++ b/clang/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, |