Refactor the location classes to be attributes instead of separate IR classes.
authorRiver Riddle <riverriddle@google.com>
Sat, 22 Jun 2019 01:27:49 +0000 (18:27 -0700)
committerjpienaar <jpienaar@google.com>
Sat, 22 Jun 2019 16:17:51 +0000 (09:17 -0700)
commit36b7c2da1de2959d93cd9bd1b4bce203cb189a39
treea7dc2ef8c4d17d7967fbd62420bf76642912af5e
parente4f8f3bc350082369cddd12a0a60941e160f1a61
Refactor the location classes to be attributes instead of separate IR classes.

This will allow for locations to be used in the same contexts as attributes. Given that attributes are nullable types, the 'Location' class now represents a non-nullable wrapper around a 'LocationAttr'. This preserves the desired semantics we have for non-optional locations.

PiperOrigin-RevId: 254505278
13 files changed:
mlir/include/mlir/IR/Attributes.h
mlir/include/mlir/IR/Location.h
mlir/include/mlir/IR/StandardTypes.h
mlir/include/mlir/IR/StorageUniquerSupport.h
mlir/include/mlir/IR/Types.h
mlir/lib/IR/AsmPrinter.cpp
mlir/lib/IR/Diagnostics.cpp
mlir/lib/IR/Location.cpp
mlir/lib/IR/LocationDetail.h
mlir/lib/IR/MLIRContext.cpp
mlir/lib/IR/StandardTypes.cpp
mlir/lib/Parser/Parser.cpp
mlir/test/IR/parser.mlir