Bug 17569: add namespaces to work with gcc-4.7

llvm-svn: 192627
This commit is contained in:
Nick Kledzik 2013-10-14 21:24:48 +00:00
parent bd5bd4b36a
commit 2453a3d956
1 changed files with 17 additions and 7 deletions

View File

@ -75,6 +75,19 @@ using lld::mach_o::normalized::ExportFlags;
using lld::mach_o::normalized::Export;
using lld::mach_o::normalized::NormalizedFile;
LLVM_YAML_IS_SEQUENCE_VECTOR(Segment);
LLVM_YAML_IS_SEQUENCE_VECTOR(DependentDylib);
LLVM_YAML_IS_SEQUENCE_VECTOR(RebaseLocation);
LLVM_YAML_IS_SEQUENCE_VECTOR(BindLocation);
LLVM_YAML_IS_SEQUENCE_VECTOR(Export);
LLVM_YAML_IS_SEQUENCE_VECTOR(StringRef);
// for compatibility with gcc-4.7 in C++11 mode, add extra namespace
namespace llvm {
namespace yaml {
// A vector of Sections is a sequence.
template<>
struct SequenceTraits< std::vector<Section> > {
@ -454,7 +467,6 @@ struct MappingTraits<Segment> {
io.mapRequired("access", seg.access);
}
};
LLVM_YAML_IS_SEQUENCE_VECTOR(Segment);
template <>
struct ScalarEnumerationTraits<LoadCommandType> {
@ -480,7 +492,6 @@ struct MappingTraits<DependentDylib> {
}
};
LLVM_YAML_IS_SEQUENCE_VECTOR(DependentDylib);
template <>
struct ScalarEnumerationTraits<RebaseType> {
@ -505,7 +516,7 @@ struct MappingTraits<RebaseLocation> {
}
};
LLVM_YAML_IS_SEQUENCE_VECTOR(RebaseLocation);
template <>
struct ScalarEnumerationTraits<BindType> {
@ -533,8 +544,6 @@ struct MappingTraits<BindLocation> {
}
};
LLVM_YAML_IS_SEQUENCE_VECTOR(BindLocation);
template <>
struct ScalarEnumerationTraits<ExportSymbolKind> {
@ -572,8 +581,6 @@ struct MappingTraits<Export> {
}
};
LLVM_YAML_IS_SEQUENCE_VECTOR(Export);
LLVM_YAML_IS_SEQUENCE_VECTOR(StringRef);
template <>
struct MappingTraits<NormalizedFile> {
@ -603,6 +610,9 @@ struct MappingTraits<NormalizedFile> {
}
};
} // namespace llvm
} // namespace yaml
namespace lld {
namespace mach_o {