1//===- Operation.cpp ------------------------------------------------------===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8
9#include "mlir/Tools/PDLL/ODS/Operation.h"
10
11using namespace mlir;
12using namespace mlir::pdll::ods;
13
14//===----------------------------------------------------------------------===//
15// Operation
16//===----------------------------------------------------------------------===//
17
18Operation::Operation(StringRef name, StringRef summary, StringRef desc,
19 StringRef nativeClassName, bool supportsTypeInferrence,
20 llvm::SMLoc loc)
21 : name(name.str()), summary(summary.str()), description(desc.str()),
22 nativeClassName(nativeClassName.str()),
23 supportsTypeInferrence(supportsTypeInferrence),
24 location(loc, llvm::SMLoc::getFromPointer(Ptr: loc.getPointer() + 1)) {}
25