|
36 | 36 | #include "clang/CIR/Interfaces/CIRLoopOpInterface.h"
|
37 | 37 | #include "clang/CIR/Interfaces/CIROpInterfaces.h"
|
38 | 38 |
|
39 |
| -namespace mlir { |
40 |
| -namespace OpTrait { |
41 |
| - |
42 |
| -namespace impl { |
43 |
| -// These functions are out-of-line implementations of the methods in the |
44 |
| -// corresponding trait classes. This avoids them being template |
45 |
| -// instantiated/duplicated. |
46 |
| -LogicalResult verifySameFirstOperandAndResultType(Operation *op); |
47 |
| -LogicalResult verifySameSecondOperandAndResultType(Operation *op); |
48 |
| -LogicalResult verifySameFirstSecondOperandAndResultType(Operation *op); |
49 |
| -} // namespace impl |
50 |
| - |
51 |
| -/// This class provides verification for ops that are known to have the same |
52 |
| -/// first operand and result type. |
53 |
| -/// |
54 |
| -template <typename ConcreteType> |
55 |
| -class SameFirstOperandAndResultType |
56 |
| - : public TraitBase<ConcreteType, SameFirstOperandAndResultType> { |
57 |
| -public: |
58 |
| - static llvm::LogicalResult verifyTrait(Operation *op) { |
59 |
| - return impl::verifySameFirstOperandAndResultType(op); |
60 |
| - } |
61 |
| -}; |
62 |
| - |
63 |
| -/// This class provides verification for ops that are known to have the same |
64 |
| -/// second operand and result type. |
65 |
| -/// |
66 |
| -template <typename ConcreteType> |
67 |
| -class SameSecondOperandAndResultType |
68 |
| - : public TraitBase<ConcreteType, SameSecondOperandAndResultType> { |
69 |
| -public: |
70 |
| - static llvm::LogicalResult verifyTrait(Operation *op) { |
71 |
| - return impl::verifySameSecondOperandAndResultType(op); |
72 |
| - } |
73 |
| -}; |
74 |
| - |
75 |
| -/// This class provides verification for ops that are known to have the same |
76 |
| -/// first, second operand and result type. |
77 |
| -/// |
78 |
| -template <typename ConcreteType> |
79 |
| -class SameFirstSecondOperandAndResultType |
80 |
| - : public TraitBase<ConcreteType, SameFirstSecondOperandAndResultType> { |
81 |
| -public: |
82 |
| - static llvm::LogicalResult verifyTrait(Operation *op) { |
83 |
| - return impl::verifySameFirstSecondOperandAndResultType(op); |
84 |
| - } |
85 |
| -}; |
86 |
| - |
87 |
| -} // namespace OpTrait |
88 |
| - |
89 |
| -} // namespace mlir |
90 |
| - |
91 | 39 | namespace cir {
|
92 | 40 | void buildTerminatedBody(mlir::OpBuilder &builder, mlir::Location loc);
|
93 | 41 | } // namespace cir
|
|
0 commit comments