//===- Location.cpp - MLIR Location Classes -------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// #include "mlir/IR/Location.h" #include "mlir/IR/BuiltinDialect.h" #include "mlir/IR/Visitors.h" #include "llvm/ADT/SetVector.h" #include "llvm/ADT/TypeSwitch.h" usingnamespacemlir; usingnamespacemlir::detail; //===----------------------------------------------------------------------===// /// Tablegen Attribute Definitions //===----------------------------------------------------------------------===// #define GET_ATTRDEF_CLASSES #include "mlir/IR/BuiltinLocationAttributes.cpp.inc" //===----------------------------------------------------------------------===// // BuiltinDialect //===----------------------------------------------------------------------===// void BuiltinDialect::registerLocationAttributes() { … } //===----------------------------------------------------------------------===// // LocationAttr //===----------------------------------------------------------------------===// WalkResult LocationAttr::walk(function_ref<WalkResult(Location)> walkFn) { … } /// Methods for support type inquiry through isa, cast, and dyn_cast. bool LocationAttr::classof(Attribute attr) { … } //===----------------------------------------------------------------------===// // CallSiteLoc //===----------------------------------------------------------------------===// CallSiteLoc CallSiteLoc::get(Location name, ArrayRef<Location> frames) { … } //===----------------------------------------------------------------------===// // FusedLoc //===----------------------------------------------------------------------===// Location FusedLoc::get(ArrayRef<Location> locs, Attribute metadata, MLIRContext *context) { … }