mirror of
https://github.com/intel/llvm.git
synced 2026-01-19 09:31:59 +08:00
[mlir] Fully qualify typenames in SymbolInterfaces.td
Differential Revision: https://reviews.llvm.org/D158305
This commit is contained in:
committed by
Markus Böck
parent
b8f191e054
commit
6a0e536ccf
@@ -31,7 +31,7 @@ def Symbol : OpInterface<"SymbolOpInterface"> {
|
||||
|
||||
let methods = [
|
||||
InterfaceMethod<"Returns the name of this symbol.",
|
||||
"StringAttr", "getNameAttr", (ins), [{
|
||||
"::mlir::StringAttr", "getNameAttr", (ins), [{
|
||||
// Don't rely on the trait implementation as optional symbol operations
|
||||
// may override this.
|
||||
return mlir::SymbolTable::getSymbolName($_op);
|
||||
@@ -178,13 +178,13 @@ def Symbol : OpInterface<"SymbolOpInterface"> {
|
||||
using Visibility = mlir::SymbolTable::Visibility;
|
||||
|
||||
/// Convenience version of `getNameAttr` that returns a StringRef.
|
||||
StringRef getName() {
|
||||
::mlir::StringRef getName() {
|
||||
return getNameAttr().getValue();
|
||||
}
|
||||
|
||||
/// Convenience version of `setName` that take a StringRef.
|
||||
void setName(StringRef name) {
|
||||
setName(StringAttr::get($_op->getContext(), name));
|
||||
void setName(::mlir::StringRef name) {
|
||||
setName(::mlir::StringAttr::get($_op->getContext(), name));
|
||||
}
|
||||
}];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user