OSDN Git Service

Resubmit "Make YAML support SmallVector"
authorZachary Turner <zturner@google.com>
Fri, 5 Aug 2016 23:12:31 +0000 (23:12 +0000)
committerZachary Turner <zturner@google.com>
Fri, 5 Aug 2016 23:12:31 +0000 (23:12 +0000)
commitab23f2239f17c719b29a67bbef01cfdfde92cfe7
tree2f8fb25080cd89bf20b1ca2a81858b682f610f4b
parent4b55580c72ecd8a70c8a41bd0d6e1cfc5e6fb6a0
Resubmit "Make YAML support SmallVector"

This resubmits a3770391c5fb64108d565e12f61dd77ce71b5b4f,
which was reverted due to breakages on non-Windows machines.

Due to differences in template instantiation rules on Microsoft
and non-Microsoft platforms, a member access restriction was
triggering on non-Microsoft compilers.  Previously, a friend
declaration for std::vector<> had been introduced into the
DebugMap class to make the member access restriction pass,
but the introduction of support for SmallVector<> meant that
an additional friend declaration would need to be added.

This didn't really make a lot of sense since the user of the
macro is probably only using one type (SmallVector<>, vector<>,
etc) and we could in theory add support for even more types
to this macro in the future (e.g. std::deque), so rather than
add another friend declaration, I just made the type being
referenced a public nested typedef instead of a private nested
typedef.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277888 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Support/YAMLTraits.h
tools/dsymutil/DebugMap.h