From 970ce642fe914585426610ceef96d6c5588a567a Mon Sep 17 00:00:00 2001 From: David Blaikie Date: Tue, 21 Nov 2017 00:23:17 +0000 Subject: [PATCH] YAML/XRay/std::vector: Fix ODR violation by removing local specialization There's a generic partial specialization for all std::vector 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 | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/llvm/include/llvm/XRay/YAMLXRayRecord.h b/llvm/include/llvm/XRay/YAMLXRayRecord.h index 122b884..b436aef 100644 --- a/llvm/include/llvm/XRay/YAMLXRayRecord.h +++ b/llvm/include/llvm/XRay/YAMLXRayRecord.h @@ -86,16 +86,6 @@ template <> struct MappingTraits { static constexpr bool flow = true; }; -template <> struct SequenceTraits> { - static constexpr bool flow = true; - static size_t size(IO &IO, std::vector &V) { return V.size(); } - static uint64_t &element(IO &IO, std::vector &V, size_t Index) { - if (Index >= V.size()) - V.resize(Index + 1); - return V[Index]; - } -}; - template <> struct MappingTraits { static void mapping(IO &IO, xray::YAMLXRayTrace &Trace) { // A trace file contains two parts, the header and the list of all the -- 2.7.4