Skip to content

Commit 5de9eff

Browse files
authored
Merge pull request #32680 from davezarzycki/pr32679
[SIL] NFC: Add more paranoia checks to SILType
2 parents 8a5ae9d + 0b6a21b commit 5de9eff

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

include/swift/SIL/SILType.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -621,10 +621,19 @@ template<> Can##ID##Type SILType::getAs<ID##Type>() const = delete; \
621621
template<> Can##ID##Type SILType::castTo<ID##Type>() const = delete; \
622622
template<> bool SILType::is<ID##Type>() const = delete;
623623
NON_SIL_TYPE(Function)
624+
NON_SIL_TYPE(GenericFunction)
624625
NON_SIL_TYPE(AnyFunction)
625626
NON_SIL_TYPE(LValue)
627+
NON_SIL_TYPE(InOut)
626628
#undef NON_SIL_TYPE
627629

630+
#define TYPE(ID, PARENT)
631+
#define UNCHECKED_TYPE(ID, PARENT) \
632+
template<> Can##ID##Type SILType::getAs<ID##Type>() const = delete; \
633+
template<> Can##ID##Type SILType::castTo<ID##Type>() const = delete; \
634+
template<> bool SILType::is<ID##Type>() const = delete;
635+
#include "swift/AST/TypeNodes.def"
636+
628637
inline llvm::raw_ostream &operator<<(llvm::raw_ostream &OS, SILType T) {
629638
T.print(OS);
630639
return OS;

0 commit comments

Comments
 (0)