Skip to content

Commit 0b6a21b

Browse files
committed
[SIL] NFC: Add more paranoia checks to SILType
1 parent 1992579 commit 0b6a21b

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
@@ -622,10 +622,19 @@ template<> Can##ID##Type SILType::getAs<ID##Type>() const = delete; \
622622
template<> Can##ID##Type SILType::castTo<ID##Type>() const = delete; \
623623
template<> bool SILType::is<ID##Type>() const = delete;
624624
NON_SIL_TYPE(Function)
625+
NON_SIL_TYPE(GenericFunction)
625626
NON_SIL_TYPE(AnyFunction)
626627
NON_SIL_TYPE(LValue)
628+
NON_SIL_TYPE(InOut)
627629
#undef NON_SIL_TYPE
628630

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

0 commit comments

Comments
 (0)