11#ifndef GLU_AST_ASTNODE_MACROS_HPP
22#define GLU_AST_ASTNODE_MACROS_HPP
33
4- #include " Basic/LLVMCompat.hpp"
5-
64#define GLU_AST_GEN_CHILD (Self, Child, _name, Name ) \
75 Child _name; \
86 \
@@ -41,19 +39,18 @@ private: \
4139 } \
4240 llvm::MutableArrayRef<Child> get##Name##Mutable() \
4341 { \
44- return { GLU_GET_SINGLE_TRAILING_OBJECTS (Child ), num }; \
42+ return { this -> getTrailingObjects ( ), num }; \
4543 } \
4644 \
4745public: \
4846 llvm::ArrayRef<Child> get##Name() const \
4947 { \
50- return { GLU_GET_SINGLE_TRAILING_OBJECTS (Child ), num }; \
48+ return { this -> getTrailingObjects ( ), num }; \
5149 } \
5250 void set##Name(llvm::ArrayRef<Child> children) \
5351 { \
5452 std::copy ( \
55- children.begin (), children.end (), \
56- GLU_GET_SINGLE_TRAILING_OBJECTS (Child) \
53+ children.begin (), children.end (), this ->getTrailingObjects () \
5754 ); \
5855 for (Child &child : get##Name##Mutable ()) { \
5956 child->setParent (this ); \
@@ -65,8 +62,7 @@ private: \
6562 { \
6663 num = children.size (); \
6764 std::uninitialized_copy ( \
68- children.begin (), children.end (), \
69- GLU_GET_SINGLE_TRAILING_OBJECTS (Child) \
65+ children.begin (), children.end (), this ->getTrailingObjects () \
7066 ); \
7167 for (Child &child : get##Name##Mutable ()) { \
7268 child->setParent (this ); \
0 commit comments