projects
/
oota-llvm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Replace push_back(Constructor(foo)) with emplace_back(foo) for non-trivial types
[oota-llvm.git]
/
lib
/
AsmParser
/
LLParser.cpp
diff --git
a/lib/AsmParser/LLParser.cpp
b/lib/AsmParser/LLParser.cpp
index aa8332fa2a4aae9090ec4728658562fb36e1d2ab..28419fb27c136a6b15b10876deda6f0511974f75 100644
(file)
--- a/
lib/AsmParser/LLParser.cpp
+++ b/
lib/AsmParser/LLParser.cpp
@@
-1902,9
+1902,9
@@
bool LLParser::ParseArgumentList(SmallVectorImpl<ArgInfo> &ArgList,
return Error(TypeLoc, "invalid type for function argument");
unsigned AttrIndex = 1;
return Error(TypeLoc, "invalid type for function argument");
unsigned AttrIndex = 1;
- ArgList.
push_back(ArgInfo(TypeLoc, ArgTy
,
-
AttributeSet::get(ArgTy->getContext(
),
-
AttrIndex++, Attrs),
Name));
+ ArgList.
emplace_back(TypeLoc, ArgTy, AttributeSet::get(ArgTy->getContext()
,
+
AttrIndex++, Attrs
),
+
std::move(
Name));
while (EatIfPresent(lltok::comma)) {
// Handle ... at end of arg list.
while (EatIfPresent(lltok::comma)) {
// Handle ... at end of arg list.
@@
-1930,10
+1930,10
@@
bool LLParser::ParseArgumentList(SmallVectorImpl<ArgInfo> &ArgList,
if (!ArgTy->isFirstClassType())
return Error(TypeLoc, "invalid type for function argument");
if (!ArgTy->isFirstClassType())
return Error(TypeLoc, "invalid type for function argument");
- ArgList.
push_back(ArgInfo(TypeLoc, ArgTy,
-
AttributeSet::get(ArgTy->getContext()
,
-
AttrIndex++, Attrs),
-
Name));
+ ArgList.
emplace_back(
+
TypeLoc, ArgTy
,
+
AttributeSet::get(ArgTy->getContext(),
AttrIndex++, Attrs),
+
std::move(
Name));
}
}
}
}