Changeset View
Changeset View
Standalone View
Standalone View
mlir/lib/TableGen/OpInterfaces.cpp
Show First 20 Lines • Show All 86 Lines • ▼ Show 20 Lines | |||||
} | } | ||||
// Return the interfaces extra class declaration code. | // Return the interfaces extra class declaration code. | ||||
llvm::Optional<StringRef> OpInterface::getExtraClassDeclaration() const { | llvm::Optional<StringRef> OpInterface::getExtraClassDeclaration() const { | ||||
auto value = def->getValueAsString("extraClassDeclaration"); | auto value = def->getValueAsString("extraClassDeclaration"); | ||||
return value.empty() ? llvm::Optional<StringRef>() : value; | return value.empty() ? llvm::Optional<StringRef>() : value; | ||||
} | } | ||||
// Return the traits extra class declaration code. | |||||
llvm::Optional<StringRef> OpInterface::getExtraTraitClassDeclaration() const { | |||||
auto value = def->getValueAsString("extraTraitClassDeclaration"); | |||||
return value.empty() ? llvm::Optional<StringRef>() : value; | |||||
} | |||||
// Return the body for this method if it has one. | // Return the body for this method if it has one. | ||||
llvm::Optional<StringRef> OpInterface::getVerify() const { | llvm::Optional<StringRef> OpInterface::getVerify() const { | ||||
auto value = def->getValueAsString("verify"); | auto value = def->getValueAsString("verify"); | ||||
return value.empty() ? llvm::Optional<StringRef>() : value; | return value.empty() ? llvm::Optional<StringRef>() : value; | ||||
} | } |