From e67c9c341f18a463f5c5e43f4da520c68df76e9a Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Tue, 21 May 2013 18:53:50 +0000 Subject: [PATCH] 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++. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182405 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/Object/obj2yaml.test | 5 ++--- tools/obj2yaml/coff2yaml.cpp | 4 +++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/test/Object/obj2yaml.test b/test/Object/obj2yaml.test index c6011090851..5c145e87d5d 100644 --- a/test/Object/obj2yaml.test +++ b/test/Object/obj2yaml.test @@ -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: diff --git a/tools/obj2yaml/coff2yaml.cpp b/tools/obj2yaml/coff2yaml.cpp index 2a70cec09d9..0bb3e24c3ca 100644 --- a/tools/obj2yaml/coff2yaml.cpp +++ b/tools/obj2yaml/coff2yaml.cpp @@ -13,6 +13,8 @@ #include "llvm/Support/ErrorHandling.h" #include "llvm/Support/YAMLTraits.h" +#include + using namespace llvm; namespace { @@ -24,7 +26,7 @@ class COFFDumper { void dumpSections(unsigned numSections); void dumpSymbols(unsigned numSymbols); StringRef getHexString(ArrayRef Data); - std::vector Strings; + std::list Strings; public: COFFDumper(const object::COFFObjectFile &Obj); -- 2.34.1