[lld] r192627 - Bug 17569: add namespaces to work with gcc-4.7
Nick Kledzik
kledzik at apple.com
Mon Oct 14 14:24:48 PDT 2013
Author: kledzik
Date: Mon Oct 14 16:24:48 2013
New Revision: 192627
URL: http://llvm.org/viewvc/llvm-project?rev=192627&view=rev
Log:
Bug 17569: add namespaces to work with gcc-4.7
Modified:
lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFileYAML.cpp
Modified: lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFileYAML.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFileYAML.cpp?rev=192627&r1=192626&r2=192627&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFileYAML.cpp (original)
+++ lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFileYAML.cpp Mon Oct 14 16:24:48 2013
@@ -75,6 +75,19 @@ using lld::mach_o::normalized::ExportFla
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 {
More information about the llvm-commits
mailing list