[llvm] [mlir] [mlir] NFC: Fix layering check / parse headers violations (PR #110117)
Walter Lee via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 26 08:20:01 PDT 2024
googlewalt wrote:
Here is one example:
```
In file included from [third_party/llvm/llvm-project/mlir/include/mlir/Dialect/Linalg/TransformOps/LinalgTransformOps.h:12](https://cs.corp.google.com/piper///depot/google3/third_party/llvm/llvm-project/mlir/include/mlir/Dialect/Linalg/TransformOps/LinalgTransformOps.h?l=12&ws=waltl/19162&snapshot=4245):
In file included from [third_party/llvm/llvm-project/mlir/include/mlir/Dialect/Bufferization/IR/Bufferization.h:12](https://cs.corp.google.com/piper///depot/google3/third_party/llvm/llvm-project/mlir/include/mlir/Dialect/Bufferization/IR/Bufferization.h?l=12&ws=waltl/19162&snapshot=4245):
In file included from [third_party/llvm/llvm-project/mlir/include/mlir/Bytecode/BytecodeOpInterface.h:17](https://cs.corp.google.com/piper///depot/google3/third_party/llvm/llvm-project/mlir/include/mlir/Bytecode/BytecodeOpInterface.h?l=17&ws=waltl/19162&snapshot=4245):
In file included from [third_party/llvm/llvm-project/mlir/include/mlir/Bytecode/BytecodeImplementation.h:17](https://cs.corp.google.com/piper///depot/google3/third_party/llvm/llvm-project/mlir/include/mlir/Bytecode/BytecodeImplementation.h?l=17&ws=waltl/19162&snapshot=4245):
In file included from [third_party/llvm/llvm-project/mlir/include/mlir/IR/Attributes.h:12](https://cs.corp.google.com/piper///depot/google3/third_party/llvm/llvm-project/mlir/include/mlir/IR/Attributes.h?l=12&ws=waltl/19162&snapshot=4245):
In file included from [third_party/llvm/llvm-project/mlir/include/mlir/IR/AttributeSupport.h:18](https://cs.corp.google.com/piper///depot/google3/third_party/llvm/llvm-project/mlir/include/mlir/IR/AttributeSupport.h?l=18&ws=waltl/19162&snapshot=4245):
[third_party/llvm/llvm-project/mlir/include/mlir/IR/Types.h:420](https://cs.corp.google.com/piper///depot/google3/third_party/llvm/llvm-project/mlir/include/mlir/IR/Types.h?l=420&ws=waltl/19162&snapshot=4245):14: error: incomplete type 'mlir::transform::AnyValueType' named in nested name specifier
420 | return To::classof(ty);
| ^~~~
[third_party/llvm/llvm-project/llvm/include/llvm/Support/Casting.h:549](https://cs.corp.google.com/piper///depot/google3/third_party/llvm/llvm-project/llvm/include/llvm/Support/Casting.h?l=549&ws=waltl/19162&snapshot=4245):36: note: in instantiation of member function 'llvm::CastInfo<mlir::transform::AnyValueType, const mlir::Type>::isPossible' requested here
549 | return CastInfo<To, const From>::isPossible(Val);
| ^
[third_party/llvm/llvm-project/mlir/include/mlir/IR/Value.h:447](https://cs.corp.google.com/piper///depot/google3/third_party/llvm/llvm-project/mlir/include/mlir/IR/Value.h?l=447&ws=waltl/19162&snapshot=4245):51: note: in instantiation of function template specialization 'llvm::isa<mlir::transform::AnyValueType, mlir::Type>' requested here
447 | static bool classof(Value value) { return llvm::isa<Ty>(value.getType()); }
| ^
[third_party/llvm/llvm-project/mlir/include/mlir/IR/Value.h:616](https://cs.corp.google.com/piper///depot/google3/third_party/llvm/llvm-project/mlir/include/mlir/IR/Value.h?l=616&ws=waltl/19162&snapshot=4245):18: note: in instantiation of member function 'mlir::detail::TypedValue<mlir::transform::AnyValueType>::classof' requested here
616 | return To::classof(ty);
| ^
[third_party/llvm/llvm-project/llvm/include/llvm/Support/Casting.h:549](https://cs.corp.google.com/piper///depot/google3/third_party/llvm/llvm-project/llvm/include/llvm/Support/Casting.h?l=549&ws=waltl/19162&snapshot=4245):36: note: in instantiation of member function 'llvm::CastInfo<mlir::detail::TypedValue<mlir::transform::AnyValueType>, const mlir::OpResult>::isPossible' requested here
549 | return CastInfo<To, const From>::isPossible(Val);
| ^
[third_party/llvm/llvm-project/llvm/include/llvm/Support/Casting.h:566](https://cs.corp.google.com/piper///depot/google3/third_party/llvm/llvm-project/llvm/include/llvm/Support/Casting.h?l=566&ws=waltl/19162&snapshot=4245):10: note: in instantiation of function template specialization 'llvm::isa<mlir::detail::TypedValue<mlir::transform::AnyValueType>, mlir::OpResult>' requested here
566 | assert(isa<To>(Val) && "cast<Ty>() argument of incompatible type!");
| ^
[third_party/llvm/llvm-project/mlir/include/mlir/Dialect/Linalg/TransformOps/LinalgTransformOps.h:47](https://cs.corp.google.com/piper///depot/google3/third_party/llvm/llvm-project/mlir/include/mlir/Dialect/Linalg/TransformOps/LinalgTransformOps.h?l=47&ws=waltl/19162&snapshot=4245):7: note: forward declaration of 'mlir::transform::AnyValueType'
47 | class AnyValueType;
| ^
```
https://github.com/llvm/llvm-project/pull/110117
More information about the llvm-commits
mailing list