[FileSpecList] Add EmplaceBack method (NFC)

Instead of having to write FileSpecList::Append(FileSpec(args)) you can
now call FileSpecList::EmplaceBack(args), similar to
std::vector<>::emplace_back.

llvm-svn: 366489
This commit is contained in:
Jonas Devlieghere
2019-07-18 20:19:24 +00:00
parent be7a7ae0c3
commit f893d5bf0f
6 changed files with 18 additions and 9 deletions

View File

@@ -946,10 +946,10 @@ uint32_t ObjectFilePECOFF::ParseDependentModules() {
dll_specs.GetDirectory().SetString(m_file.GetDirectory().GetCString());
if (!llvm::sys::fs::real_path(dll_specs.GetPath(), dll_fullpath))
m_deps_filespec->Append(FileSpec(dll_fullpath));
m_deps_filespec->EmplaceBack(dll_fullpath);
else {
// Known DLLs or DLL not found in the object file directory.
m_deps_filespec->Append(FileSpec(dll_name));
m_deps_filespec->EmplaceBack(dll_name);
}
}
return m_deps_filespec->GetSize();