Make CI happy.

This commit is contained in:
scturtle 2018-02-10 10:56:14 +08:00
parent c28426bbb4
commit 1342522f2a
2 changed files with 12 additions and 1 deletions

View File

@ -37,6 +37,17 @@ struct IndexVar;
enum class SymbolKind : uint8_t { Invalid, File, Type, Func, Var }; enum class SymbolKind : uint8_t { Invalid, File, Type, Func, Var };
MAKE_REFLECT_TYPE_PROXY(SymbolKind); MAKE_REFLECT_TYPE_PROXY(SymbolKind);
// FIXME: Make old compiler happy.
namespace std {
template <>
struct hash<::SymbolKind> {
size_t operator()(const ::SymbolKind& instance) const {
using type = std::underlying_type<::SymbolKind>::type;
return std::hash<type>()(static_cast<type>(instance));
}
};
} // namespace std
using RawId = uint32_t; using RawId = uint32_t;
template <typename T> template <typename T>

View File

@ -41,7 +41,7 @@ struct SymbolRef : Reference {
SymbolRef() = default; SymbolRef() = default;
SymbolRef(Range range, Id<void> id, SymbolKind kind, SymbolRole role) SymbolRef(Range range, Id<void> id, SymbolKind kind, SymbolRole role)
: Reference{range, id, kind, role} {} : Reference{range, id, kind, role} {}
SymbolRef(Reference ref) : Reference{ref} {} SymbolRef(Reference ref) : Reference(ref) {}
SymbolRef(SymbolIdx si) SymbolRef(SymbolIdx si)
: Reference{Range(), Id<void>(si.idx), si.kind, SymbolRole::None} {} : Reference{Range(), Id<void>(si.idx), si.kind, SymbolRole::None} {}