[COFF] Simplify the code leveraging implicit conversion.

Suggested by: David Blaikie!

llvm-svn: 266140
This commit is contained in:
Davide Italiano 2016-04-12 22:05:38 +00:00
parent 08f5674bfe
commit 3774afba07
1 changed files with 1 additions and 2 deletions

View File

@ -430,8 +430,7 @@ std::vector<ObjectFile *> SymbolTable::createLTOObjects(LTOCodeGenerator *CG) {
std::vector<ObjectFile *> ObjFiles;
for (SmallString<0> &Obj : Objs) {
auto *ObjFile = new ObjectFile(
MemoryBufferRef(StringRef(Obj.data(), Obj.size()), "<LTO object>"));
auto *ObjFile = new ObjectFile(MemoryBufferRef(Obj, "<LTO object>"));
Files.emplace_back(ObjFile);
ObjectFiles.push_back(ObjFile);
ObjFile->parse();