10 #include "llvm/ADT/Twine.h"
11 #include "llvm/TableGen/Record.h"
21 return def->getValueAsString(
"effect");
25 return def->getValueAsString(
"baseEffectName");
29 StringRef trait =
def->getValueAsString(
"interfaceTrait");
30 StringRef cppNamespace =
def->getValueAsString(
"cppNamespace");
31 return cppNamespace.empty() ? trait.str()
32 : (cppNamespace +
"::" + trait).str();
36 return def->getValueAsString(
"resource");
42 return def->getValueAsBit(
"effectOnFullRegion");
46 return var->
getDef().isSubClassOf(
"SideEffect");
54 auto *listInit = dyn_cast<llvm::ListInit>(
def->getValueInit(
"effects"));
55 return {listInit->begin(), listInit->end()};
59 return def->getValueAsString(
"baseEffectName");
63 return t->
getDef().isSubClassOf(
"SideEffectsTraitBase");
StringRef getBaseEffectName() const
static bool classof(const Trait *t)
Operator::var_decorator_range getEffects() const
StringRef getName() const
std::string getInterfaceTrait() const
StringRef getBaseEffectName() const
bool getEffectOnfullRegion() const
static bool classof(const Operator::VariableDecorator *var)
StringRef getResource() const
const llvm::Record & getDef() const
Include the generated interface declarations.
A class used to represent the decorators of an operator variable, i.e.
const llvm::Record & getDef() const
const llvm::Record * def
The TableGen definition of this decorator.