We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3022812 commit aa9c00fCopy full SHA for aa9c00f
include/swift/AST/ASTNode.h
@@ -107,6 +107,19 @@ namespace llvm {
107
return LHS.getOpaqueValue() == RHS.getOpaqueValue();
108
}
109
};
110
+
111
+ // A ASTNode is "pointer like".
112
+ template <>
113
+ struct PointerLikeTypeTraits<ASTNode> {
114
+ public:
115
+ static inline void *getAsVoidPointer(ASTNode N) {
116
+ return (void *)N.getOpaqueValue();
117
+ }
118
+ static inline ASTNode getFromVoidPointer(void *P) {
119
+ return ASTNode::getFromOpaqueValue(P);
120
121
+ enum { NumLowBitsAvailable = swift::TypeAlignInBits };
122
+ };
123
124
125
#endif // LLVM_SWIFT_AST_AST_NODE_H
0 commit comments