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)
commit9e91c28b7121f726b3ee62bd5d17abb9bfe6841a
tree5a3b6513de1f6fcef809f0152d098f6e8e609ece
parent796a3e2bdd2710275c4871d00616b5b84aae2e32
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.

llvm-svn: 277888
llvm/include/llvm/Support/YAMLTraits.h
llvm/tools/dsymutil/DebugMap.h