From eeae124faf3be90af5248b18f734072d071aa776 Mon Sep 17 00:00:00 2001 From: Davide Italiano Date: Sat, 9 Apr 2016 23:00:31 +0000 Subject: [PATCH] [COFF] SmallVector -> SmallString<0>. This way we're consistent between ELF and COFF. llvm-svn: 265885 --- lld/COFF/SymbolTable.cpp | 4 ++-- lld/COFF/SymbolTable.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lld/COFF/SymbolTable.cpp b/lld/COFF/SymbolTable.cpp index 5b7b89cd360a..26e2567aec78 100644 --- a/lld/COFF/SymbolTable.cpp +++ b/lld/COFF/SymbolTable.cpp @@ -420,7 +420,7 @@ std::vector SymbolTable::createLTOObjects(LTOCodeGenerator *CG) { // Use std::list to avoid invalidation of pointers in OSPtrs. std::list OSs; std::vector OSPtrs; - for (SmallVector &Obj : Objs) { + for (SmallString<0> &Obj : Objs) { OSs.emplace_back(Obj); OSPtrs.push_back(&OSs.back()); } @@ -429,7 +429,7 @@ std::vector SymbolTable::createLTOObjects(LTOCodeGenerator *CG) { error(""); // compileOptimized() should have emitted any error message. std::vector ObjFiles; - for (SmallVector &Obj : Objs) { + for (SmallString<0> &Obj : Objs) { auto *ObjFile = new ObjectFile( MemoryBufferRef(StringRef(Obj.data(), Obj.size()), "")); Files.emplace_back(ObjFile); diff --git a/lld/COFF/SymbolTable.h b/lld/COFF/SymbolTable.h index ce305bfa8743..8bf4387cdfff 100644 --- a/lld/COFF/SymbolTable.h +++ b/lld/COFF/SymbolTable.h @@ -115,7 +115,7 @@ private: std::vector> ObjectQueue; std::vector BitcodeFiles; - std::vector> Objs; + std::vector> Objs; llvm::BumpPtrAllocator Alloc; };