[Clang] Fix building with Clang < 3.9.

This is a workaround for a bug in older versions of Clang when. The
constructor that is supposed to allow for Derived to Base conversion
does not work. Remove this if we drop support for such configurations.
This commit is contained in:
Michael Spencer
2020-07-17 13:32:12 -06:00
parent 7738c03418
commit fda901a987

View File

@@ -110,7 +110,11 @@ public:
static std::unique_ptr<MarshallingKindInfo> create(const Record &R) {
std::unique_ptr<MarshallingFlagInfo> Ret(new MarshallingFlagInfo(R));
Ret->IsPositive = R.getValueAsBit("IsPositive");
return Ret;
// FIXME: This is a workaround for a bug in older versions of libstdc++ when
// compiled with Clang. The constructor that is supposed to allow for
// Derived to Base conversion does not work. Remove this if we drop
// support for such configurations.
return std::unique_ptr<MarshallingKindInfo>(Ret.release());
}
private:
@@ -204,7 +208,11 @@ struct SimpleEnumValueTable {
"values");
}
return Ret;
// FIXME: This is a workaround for a bug in older versions of libstdc++ when
// compiled with Clang. The constructor that is supposed to allow for
// Derived to Base conversion does not work. Remove this if we drop
// support for such configurations.
return std::unique_ptr<MarshallingKindInfo>(Ret.release());
}
private: