MLLIF
a MLIR-based Language to Language Interoperability Flyover
Loading...
Searching...
No Matches
BridgeGen.cxx File Reference
Include dependency graph for BridgeGen.cxx:

Go to the source code of this file.

Macros

#define CHILD_OF(t)
 
#define NESTED_DECL(t, cond, msg, I, ...)
 

Macro Definition Documentation

◆ CHILD_OF

#define CHILD_OF ( t)
Value:
std::dynamic_pointer_cast<t##Decl>(child)

◆ NESTED_DECL

#define NESTED_DECL ( t,
cond,
msg,
I,
... )
Value:
if (const auto decl = std::dynamic_pointer_cast<t##Decl>(node)) { \
if (!handle##t##Begin(context, *decl, out, indent)) { \
return false; \
} \
\
for (auto i = 0; i < decl->children().size(); ++i) { \
auto &child = decl->children()[i]; \
if (cond) { \
context.error(msg); \
continue; \
} \
if (!handleDecl(context, child, out, indent + 1 + I)) { \
continue; \
} \
__VA_ARGS__ \
} \
\
if (!handle##t##End(context, *decl, out, indent)) { \
return false; \
} \
}