Fix unused variable warning in the Toy tutorial (NFC)
authorMehdi Amini <aminim@google.com>
Fri, 10 May 2019 21:05:53 +0000 (14:05 -0700)
committerMehdi Amini <joker.eph@gmail.com>
Sat, 11 May 2019 02:29:58 +0000 (19:29 -0700)
--

PiperOrigin-RevId: 247672377

mlir/examples/toy/Ch2/mlir/MLIRGen.cpp
mlir/examples/toy/Ch5/mlir/ShapeInferencePass.cpp

index 4fd3e52..5eb8cd0 100644 (file)
@@ -477,7 +477,6 @@ private:
   /// They are wrapped in a `toy` dialect (see next chapter) and get printed:
   ///   !toy.array<2, 2>
   template <typename T> mlir::Type getType(T shape) {
-    mlir::Type elementType = mlir::FloatType::getF64(&context);
     std::string typeName = "array";
     if (!shape.empty()) {
       typeName += "<";
index 7e3ea3f..a083e62 100644 (file)
@@ -367,7 +367,6 @@ public:
       SmallVector<mlir::Type, 1> retTy;
       if (ret.getNumOperands())
         retTy.push_back(ret.getOperand()->getType());
-      mlir::Type elementType = mlir::FloatType::getF64(&getContext());
       std::vector<mlir::Type> argumentsType;
       for (auto arg : f->getArguments())
         argumentsType.push_back(arg->getType());