Lines Matching defs:node
24 if (auto node = getAs<ASTNode>()) {
25 return node.getName();
29 PrintFatalError(getLoc(), "unexpected node declaring properties");
33 static StringRef removeExpectedNodeNameSuffix(const Record *node,
35 StringRef nodeName = node->getName();
37 PrintFatalError(node->getLoc(),
38 Twine("name of node doesn't end in ") + suffix);
43 // Decl node names don't end in Decl for historical reasons, and it would
45 // is exactly the node name, and the class name is simply that plus Decl.
94 // A map from a node to each of its child nodes.
97 static void visitASTNodeRecursive(ASTNode node, ASTNode base,
100 visit(node, base);
102 auto i = map.lower_bound(node), e = map.upper_bound(node);
104 visitASTNodeRecursive(i->second, node, map, visit);
110 // Check for the node class, just as a basic correctness check.
112 PrintFatalError(Twine("cannot find definition for node class ")
119 for (ASTNode node : records.getAllDerivedDefinitions(nodeClassName)) {
120 if (auto base = node.getBase())
121 hierarchy.insert(std::make_pair(base, node));
123 PrintFatalError(node.getLoc(),
126 root = node;
129 PrintFatalError(Twine("no root node in ") + nodeClassName + " hierarchy");
131 // Now visit the map recursively, starting at the root node.