diff options
author | River Riddle <riverriddle@google.com> | 2019-06-18 18:26:26 -0700 |
---|---|---|
committer | Mehdi Amini <joker.eph@gmail.com> | 2019-06-19 23:07:34 -0700 |
commit | 30bbd910565a1319bf121b0ef87031b8217cf1c2 (patch) | |
tree | 71c44332f8984385c2d6d573e69fffe60d11828c /mlir/lib/IR/Attributes.cpp | |
parent | 18743a33ac0caf08b69f097383c176a8a653e4f5 (diff) | |
download | bcm5719-llvm-30bbd910565a1319bf121b0ef87031b8217cf1c2.tar.gz bcm5719-llvm-30bbd910565a1319bf121b0ef87031b8217cf1c2.zip |
Simplify usages of SplatElementsAttr now that it inherits from DenseElementsAttr.
PiperOrigin-RevId: 253910543
Diffstat (limited to 'mlir/lib/IR/Attributes.cpp')
-rw-r--r-- | mlir/lib/IR/Attributes.cpp | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/mlir/lib/IR/Attributes.cpp b/mlir/lib/IR/Attributes.cpp index ce33508830c..f4a6cf11bca 100644 --- a/mlir/lib/IR/Attributes.cpp +++ b/mlir/lib/IR/Attributes.cpp @@ -941,28 +941,6 @@ Attribute SparseElementsAttr::getValue(ArrayRef<uint64_t> index) const { } //===----------------------------------------------------------------------===// -// SplatElementsAttr -//===----------------------------------------------------------------------===// - -SplatElementsAttr SplatElementsAttr::get(ShapedType type, Attribute elt) { - return DenseElementsAttr::get(type, elt).cast<SplatElementsAttr>(); -} - -SplatElementsAttr SplatElementsAttr::mapValues( - Type newElementType, - llvm::function_ref<APInt(const APInt &)> mapping) const { - return DenseElementsAttr::mapValues(newElementType, mapping) - .cast<SplatElementsAttr>(); -} - -SplatElementsAttr SplatElementsAttr::mapValues( - Type newElementType, - llvm::function_ref<APInt(const APFloat &)> mapping) const { - return DenseElementsAttr::mapValues(newElementType, mapping) - .cast<SplatElementsAttr>(); -} - -//===----------------------------------------------------------------------===// // NamedAttributeList //===----------------------------------------------------------------------===// |