Skip to content

Add missing imports #138550

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#define MLIR_DIALECT_AFFINE_IR_VALUEBOUNDSOPINTERFACEIMPL_H

#include "mlir/Support/LLVM.h"
#include <cstdint>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this import needed?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[1747/5390] Building CXX object tools/mlir/lib/Dialect/Affine/IR/CMakeFiles/obj.MLIRAffineDialect.dir/ValueBoundsOpInterfaceImpl.cpp.o
FAILED: tools/mlir/lib/Dialect/Affine/IR/CMakeFiles/obj.MLIRAffineDialect.dir/ValueBoundsOpInterfaceImpl.cpp.o
CCACHE_CPP2=yes CCACHE_HASHDIR=yes /usr/bin/ccache /usr/bin/c++ -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/filip/Work/llvm-project/build/tools/mlir/lib/Dialect/Affine/IR -I/home/filip/Work/llvm-project/mlir/lib/Dialect/Affine/IR -I/home/filip/Work/llvm-project/build/include -I/home/filip/Work/llvm-project/llvm/include -I/home/filip/Work/llvm-project/mlir/include -I/home/filip/Work/llvm-project/build/tools/mlir/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -fno-lifetime-dse -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-maybe-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -Wundef -O3 -DNDEBUG -std=c++17  -fno-exceptions -funwind-tables -MD -MT tools/mlir/lib/Dialect/Affine/IR/CMakeFiles/obj.MLIRAffineDialect.dir/ValueBoundsOpInterfaceImpl.cpp.o -MF tools/mlir/lib/Dialect/Affine/IR/CMakeFiles/obj.MLIRAffineDialect.dir/ValueBoundsOpInterfaceImpl.cpp.o.d -o tools/mlir/lib/Dialect/Affine/IR/CMakeFiles/obj.MLIRAffineDialect.dir/ValueBoundsOpInterfaceImpl.cpp.o -c /home/filip/Work/llvm-project/mlir/lib/Dialect/Affine/IR/ValueBoundsOpInterfaceImpl.cpp
In file included from /home/filip/Work/llvm-project/mlir/lib/Dialect/Affine/IR/ValueBoundsOpInterfaceImpl.cpp:9:
/home/filip/Work/llvm-project/mlir/include/mlir/Dialect/Affine/IR/ValueBoundsOpInterfaceImpl.h:31:11: error: ‘int64_t’ was not declared in this scope
   31 | FailureOr<int64_t> fullyComposeAndComputeConstantDelta(Value value1,
      |           ^~~~~~~
/home/filip/Work/llvm-project/mlir/include/mlir/Dialect/Affine/IR/ValueBoundsOpInterfaceImpl.h:13:1: note: ‘int64_t’ is defined in header ‘<cstdint>’; this is probably fixable by adding ‘#include <cstdint>’
   12 | #include "mlir/Support/LLVM.h"
  +++ |+#include <cstdint>
   13 |
/home/filip/Work/llvm-project/mlir/include/mlir/Dialect/Affine/IR/ValueBoundsOpInterfaceImpl.h:31:18: error: template argument 1 is invalid
   31 | FailureOr<int64_t> fullyComposeAndComputeConstantDelta(Value value1,
      |                  ^
/home/filip/Work/llvm-project/mlir/lib/Dialect/Affine/IR/ValueBoundsOpInterfaceImpl.cpp:107:77: error: ‘llvm::FailureOr<long int> mlir::affine::fullyComposeAndComputeConstantDelta(mlir::Value, mlir::Value)’ should have been declared inside ‘mlir::affine’
  107 | mlir::affine::fullyComposeAndComputeConstantDelta(Value value1, Value value2) {
      |                                                                             ^
/home/filip/Work/llvm-project/mlir/lib/Dialect/Affine/IR/ValueBoundsOpInterfaceImpl.cpp:107:1: error: ambiguating new declaration of ‘llvm::FailureOr<long int> mlir::affine::fullyComposeAndComputeConstantDelta(mlir::Value, mlir::Value)’
  107 | mlir::affine::fullyComposeAndComputeConstantDelta(Value value1, Value value2) {
      | ^~~~
/home/filip/Work/llvm-project/mlir/include/mlir/D

It seems that without the imports I get this error when I try to build. Adding the import, as it is suggested fix the problem


namespace mlir {
class DialectRegistry;
Expand Down
1 change: 1 addition & 0 deletions mlir/include/mlir/Target/SPIRV/Deserialization.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

#include "mlir/IR/OwningOpRef.h"
#include "mlir/Support/LLVM.h"
#include <cstdint>

namespace mlir {
class MLIRContext;
Expand Down
1 change: 1 addition & 0 deletions mlir/include/mlir/Target/SPIRV/Serialization.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#define MLIR_TARGET_SPIRV_SERIALIZATION_H

#include "mlir/Support/LLVM.h"
#include <cstdint>

namespace mlir {
class MLIRContext;
Expand Down