[lld] r266140 - [COFF] Simplify the code leveraging implicit conversion.
Davide Italiano via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 12 15:05:39 PDT 2016
Author: davide
Date: Tue Apr 12 17:05:38 2016
New Revision: 266140
URL: http://llvm.org/viewvc/llvm-project?rev=266140&view=rev
Log:
[COFF] Simplify the code leveraging implicit conversion.
Suggested by: David Blaikie!
Modified:
lld/trunk/COFF/SymbolTable.cpp
Modified: lld/trunk/COFF/SymbolTable.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/COFF/SymbolTable.cpp?rev=266140&r1=266139&r2=266140&view=diff
==============================================================================
--- lld/trunk/COFF/SymbolTable.cpp (original)
+++ lld/trunk/COFF/SymbolTable.cpp Tue Apr 12 17:05:38 2016
@@ -430,8 +430,7 @@ std::vector<ObjectFile *> SymbolTable::c
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();
More information about the llvm-commits
mailing list