Fix MacOS build: static constexpr must be defined
authorMehdi Amini <aminim@google.com>
Mon, 6 May 2019 15:05:09 +0000 (08:05 -0700)
committerMehdi Amini <joker.eph@gmail.com>
Mon, 6 May 2019 15:30:26 +0000 (08:30 -0700)
    This can be removed in C++17.

--

PiperOrigin-RevId: 246827022

mlir/lib/IR/StandardTypes.cpp

index c14a6b8..036fd09 100644 (file)
@@ -31,6 +31,9 @@ using namespace mlir::detail;
 // Integer Type
 //===----------------------------------------------------------------------===//
 
+// static constexpr must have a definition (until in C++17 and inline variable).
+constexpr unsigned IntegerType::kMaxWidth;
+
 /// Verify the construction of an integer type.
 LogicalResult IntegerType::verifyConstructionInvariants(
     llvm::Optional<Location> loc, MLIRContext *context, unsigned width) {