File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -590,6 +590,32 @@ class FullApplySite : public ApplySite {
590
590
591
591
namespace llvm {
592
592
593
+ template <>
594
+ struct PointerLikeTypeTraits <swift::ApplySite> {
595
+ public:
596
+ static inline void *getAsVoidPointer (swift::ApplySite apply) {
597
+ return (void *)apply.getInstruction ();
598
+ }
599
+ static inline swift::ApplySite getFromVoidPointer (void *pointer) {
600
+ return swift::ApplySite ((swift::SILInstruction*)pointer);
601
+ }
602
+ enum { NumLowBitsAvailable =
603
+ PointerLikeTypeTraits<swift::SILNode *>::NumLowBitsAvailable };
604
+ };
605
+
606
+ template <>
607
+ struct PointerLikeTypeTraits <swift::FullApplySite> {
608
+ public:
609
+ static inline void *getAsVoidPointer (swift::FullApplySite apply) {
610
+ return (void *)apply.getInstruction ();
611
+ }
612
+ static inline swift::FullApplySite getFromVoidPointer (void *pointer) {
613
+ return swift::FullApplySite ((swift::SILInstruction*)pointer);
614
+ }
615
+ enum { NumLowBitsAvailable =
616
+ PointerLikeTypeTraits<swift::SILNode *>::NumLowBitsAvailable };
617
+ };
618
+
593
619
// An ApplySite casts like a SILInstruction*.
594
620
template <> struct simplify_type <const ::swift::ApplySite> {
595
621
using SimpleType = ::swift::SILInstruction *;
You can’t perform that action at this time.
0 commit comments