Attributes: Avoid a big useless copy in the emitter

llvm-svn: 201251
This commit is contained in:
Reid Kleckner 2014-02-12 19:26:24 +00:00
parent 375fddcf5c
commit f06b266bfa
1 changed files with 2 additions and 1 deletions

View File

@ -607,7 +607,8 @@ namespace {
};
// Unique the enums, but maintain the original declaration ordering.
std::vector<std::string> uniqueEnumsInOrder(std::vector<std::string> enums) {
std::vector<std::string>
uniqueEnumsInOrder(const std::vector<std::string> &enums) {
std::vector<std::string> uniques;
std::set<std::string> unique_set(enums.begin(), enums.end());
for (std::vector<std::string>::const_iterator i = enums.begin(),