[lldb/Reproducers] Treat SB classes pass by value as const references

Unless trivially copyable, SB classes that are passed by value should be
treated as const references by the reproducer infrastructure and their
address should be serialized. This is already the case on the
serialization side, but not on the deserialization side. This fixes that
by removing the NotImplementedTag.
This commit is contained in:
Jonas Devlieghere 2020-02-04 13:18:12 -08:00
parent 2757f93a5a
commit f8c0fcd23d
1 changed files with 1 additions and 7 deletions

View File

@ -249,12 +249,11 @@ struct ReferenceTag {};
struct ValueTag {};
struct FundamentalPointerTag {};
struct FundamentalReferenceTag {};
struct NotImplementedTag {};
/// Return the deserialization tag for the given type T.
template <class T> struct serializer_tag {
typedef typename std::conditional<std::is_trivially_copyable<T>::value,
ValueTag, NotImplementedTag>::type type;
ValueTag, ReferenceTag>::type type;
};
template <class T> struct serializer_tag<T *> {
typedef
@ -321,11 +320,6 @@ public:
}
private:
template <typename T> T Read(NotImplementedTag) {
m_buffer = m_buffer.drop_front(sizeof(T));
return T();
}
template <typename T> T Read(ValueTag) {
assert(HasData(sizeof(T)));
T t;