From: David Blaikie Date: Tue, 21 Nov 2017 00:23:17 +0000 (+0000) Subject: YAML/XRay/std::vector: Fix ODR violation by removing local specialization X-Git-Tag: llvmorg-6.0.0-rc1~2956 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=970ce642fe914585426610ceef96d6c5588a567a;p=platform%2Fupstream%2Fllvm.git 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 --- 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