[llvm] r318712 - YAML/XRay/std::vector: Fix ODR violation by removing local specialization
David Blaikie via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 20 16:23:17 PST 2017
Author: dblaikie
Date: Mon Nov 20 16:23:17 2017
New Revision: 318712
URL: http://llvm.org/viewvc/llvm-project?rev=318712&view=rev
Log:
YAML/XRay/std::vector: Fix ODR violation by removing local specialization
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.
Modified:
llvm/trunk/include/llvm/XRay/YAMLXRayRecord.h
Modified: llvm/trunk/include/llvm/XRay/YAMLXRayRecord.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/XRay/YAMLXRayRecord.h?rev=318712&r1=318711&r2=318712&view=diff
==============================================================================
--- llvm/trunk/include/llvm/XRay/YAMLXRayRecord.h (original)
+++ llvm/trunk/include/llvm/XRay/YAMLXRayRecord.h Mon Nov 20 16:23:17 2017
@@ -86,16 +86,6 @@ template <> struct MappingTraits<xray::Y
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
More information about the llvm-commits
mailing list