YAML/XRay/std::vector: Fix ODR violation by removing local specialization
authorDavid Blaikie <dblaikie@gmail.com>
Tue, 21 Nov 2017 00:23:17 +0000 (00:23 +0000)
committerDavid Blaikie <dblaikie@gmail.com>
Tue, 21 Nov 2017 00:23:17 +0000 (00:23 +0000)
There's a generic partial specialization for all std::vector<T> that
does what's desired, so no need for this full specialization that's
causing an ODR violation anyway.

llvm-svn: 318712

llvm/include/llvm/XRay/YAMLXRayRecord.h

index 122b884..b436aef 100644 (file)
@@ -86,16 +86,6 @@ template <> struct MappingTraits<xray::YAMLXRayRecord> {
   static constexpr bool flow = true;
 };
 
-template <> struct SequenceTraits<std::vector<uint64_t>> {
-  static constexpr bool flow = true;
-  static size_t size(IO &IO, std::vector<uint64_t> &V) { return V.size(); }
-  static uint64_t &element(IO &IO, std::vector<uint64_t> &V, size_t Index) {
-    if (Index >= V.size())
-      V.resize(Index + 1);
-    return V[Index];
-  }
-};
-
 template <> struct MappingTraits<xray::YAMLXRayTrace> {
   static void mapping(IO &IO, xray::YAMLXRayTrace &Trace) {
     // A trace file contains two parts, the header and the list of all the