summaryrefslogtreecommitdiffstats
path: root/llvm/tools/dsymutil/DebugMap.h
diff options
context:
space:
mode:
authorZachary Turner <zturner@google.com>2016-08-05 23:12:31 +0000
committerZachary Turner <zturner@google.com>2016-08-05 23:12:31 +0000
commit9e91c28b7121f726b3ee62bd5d17abb9bfe6841a (patch)
tree5a3b6513de1f6fcef809f0152d098f6e8e609ece /llvm/tools/dsymutil/DebugMap.h
parent796a3e2bdd2710275c4871d00616b5b84aae2e32 (diff)
downloadbcm5719-llvm-9e91c28b7121f726b3ee62bd5d17abb9bfe6841a.tar.gz
bcm5719-llvm-9e91c28b7121f726b3ee62bd5d17abb9bfe6841a.zip
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
Diffstat (limited to 'llvm/tools/dsymutil/DebugMap.h')
-rw-r--r--llvm/tools/dsymutil/DebugMap.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/tools/dsymutil/DebugMap.h b/llvm/tools/dsymutil/DebugMap.h
index 1a3d62b67b7..639f5037f47 100644
--- a/llvm/tools/dsymutil/DebugMap.h
+++ b/llvm/tools/dsymutil/DebugMap.h
@@ -130,6 +130,7 @@ public:
SymbolMapping() = default;
};
+ typedef std::pair<std::string, SymbolMapping> YAMLSymbolMapping;
typedef StringMapEntry<SymbolMapping> DebugMapEntry;
/// \brief Adds a symbol mapping to this DebugMapObject.
@@ -170,10 +171,8 @@ private:
/// For YAMLIO support.
///@{
- typedef std::pair<std::string, SymbolMapping> YAMLSymbolMapping;
friend yaml::MappingTraits<dsymutil::DebugMapObject>;
friend yaml::SequenceTraits<std::vector<std::unique_ptr<DebugMapObject>>>;
- friend yaml::SequenceTraits<std::vector<YAMLSymbolMapping>>;
DebugMapObject() = default;
public:
OpenPOWER on IntegriCloud