forked from OSchip/llvm-project
[mlir][Complex] Add a convenience getValue() method.
This method returns the value as std::complex<APFloat> Differential Revision: https://reviews.llvm.org/D130770
This commit is contained in:
parent
3cfa9b1431
commit
7d76da539f
|
@ -53,6 +53,12 @@ def Complex_NumberAttr : Complex_Attr<"Number", "number"> {
|
|||
}]>
|
||||
];
|
||||
|
||||
let extraClassDeclaration = [{
|
||||
std::complex<APFloat> getValue() {
|
||||
return std::complex<APFloat>(getReal(), getImag());
|
||||
}
|
||||
}];
|
||||
|
||||
let genVerifyDecl = 1;
|
||||
let hasCustomAssemblyFormat = 1;
|
||||
let skipDefaultBuilders = 1;
|
||||
|
|
Loading…
Reference in New Issue