[llvm-tapi] Don't try to override SequenceTraits for std::string

For some reason this doesn't seem to work with LLVM_LINK_LLVM_DYLIB
build.

See https://logs.chromium.org/logs/chromium/bb/client.wasm.llvm/linux/37764/+/recipes/steps/LLVM_regression_tests/0/stdout

What is more it seems that overriding these traits for core types
(including std::string) is not supported/recommend by YAMLTraits.h.
See line 1918 which has the assertion:
 "only use LLVM_YAML_IS_SEQUENCE_VECTOR for types you control"

Differential Revision: https://reviews.llvm.org/D55381

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@348630 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Sam Clegg
2018-12-07 19:29:00 +00:00
parent d19f12b58f
commit a97d9f8bb5
2 changed files with 4 additions and 18 deletions
-17
View File
@@ -126,23 +126,6 @@ template <> struct CustomMappingTraits<std::set<ELFSymbol>> {
}
};
/// YAML traits for generic string vectors (i.e. list of needed libraries).
template <> struct SequenceTraits<std::vector<std::string>> {
static size_t size(IO &IO, std::vector<std::string> &List) {
return List.size();
}
static std::string &element(IO &IO, std::vector<std::string> &List,
size_t Index) {
if (Index >= List.size())
List.resize(Index + 1);
return List[Index];
}
// Compacts list of needed libraries into a single line.
static const bool flow = true;
};
/// YAML traits for ELFStub objects.
template <> struct MappingTraits<ELFStub> {
static void mapping(IO &IO, ELFStub &Stub) {