mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
AST: inline the definition for AnyValue::Holder<Type>::equals
Unfortunately, MSVC will not preserve the template specialization in swiftAST. However, the function is pretty tiny, so simply inline it into the header. This allows the template specialization to be instantiated and inlined at the use site. The overall size impact should be negligible and this repairs the Windows build.
This commit is contained in:
@@ -550,7 +550,11 @@ public:
|
||||
// Allow AnyValue to compare two Type values, even though Type doesn't
|
||||
// support ==.
|
||||
template<>
|
||||
bool AnyValue::Holder<Type>::equals(const HolderBase &other) const;
|
||||
inline bool AnyValue::Holder<Type>::equals(const HolderBase &other) const {
|
||||
assert(typeID == other.typeID && "Caller should match type IDs");
|
||||
return value.getPointer() ==
|
||||
static_cast<const Holder<Type> &>(other).value.getPointer();
|
||||
}
|
||||
|
||||
void simple_display(llvm::raw_ostream &out, const Type &type);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user