Use std::list so that we have a stable iterator.

I will try to avoid creating these std::strings, but for now this gets
the tests passing with libc++.

llvm-svn: 182405
This commit is contained in:
Rafael Espindola 2013-05-21 18:53:50 +00:00
parent 8e5939b605
commit c823f00ed1
2 changed files with 5 additions and 4 deletions

View File

@ -1,6 +1,5 @@
RUN-disabled: obj2yaml %p/Inputs/trivial-object-test.coff-i386 | FileCheck %s --check-prefix COFF-I386
RUN-disabled: obj2yaml %p/Inputs/trivial-object-test.coff-x86-64 | FileCheck %s --check-prefix COFF-X86-64
RUN: true
RUN: obj2yaml %p/Inputs/trivial-object-test.coff-i386 | FileCheck %s --check-prefix COFF-I386
RUN: obj2yaml %p/Inputs/trivial-object-test.coff-x86-64 | FileCheck %s --check-prefix COFF-X86-64
COFF-I386: header:

View File

@ -13,6 +13,8 @@
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/YAMLTraits.h"
#include <list>
using namespace llvm;
namespace {
@ -24,7 +26,7 @@ class COFFDumper {
void dumpSections(unsigned numSections);
void dumpSymbols(unsigned numSymbols);
StringRef getHexString(ArrayRef<uint8_t> Data);
std::vector<std::string> Strings;
std::list<std::string> Strings;
public:
COFFDumper(const object::COFFObjectFile &Obj);