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 | #include "mlir/Support/IndentedOstream.h" |
11 | #include "llvm/Support/raw_ostream.h" |
12 | |
13 | using namespace mlir; |
14 | using namespace mlir::pdll::ods; |
15 | |
16 | //===----------------------------------------------------------------------===// |
17 | // Operation |
18 | //===----------------------------------------------------------------------===// |
19 | |
20 | Operation::Operation(StringRef name, StringRef summary, StringRef desc, |
21 | StringRef nativeClassName, bool supportsTypeInferrence, |
22 | llvm::SMLoc loc) |
23 | : name(name.str()), summary(summary.str()), description(desc.str()), |
24 | nativeClassName(nativeClassName.str()), |
25 | supportsTypeInferrence(supportsTypeInferrence), |
26 | location(loc, llvm::SMLoc::getFromPointer(Ptr: loc.getPointer() + 1)) {} |
27 | |