-
Notifications
You must be signed in to change notification settings - Fork 14.3k
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
Add missing imports #138550
Conversation
Thank you for submitting a Pull Request (PR) to the LLVM Project! This PR will be automatically labeled and the relevant teams will be notified. If you wish to, you can add reviewers by using the "Reviewers" section on this page. If this is not working for you, it is probably because you do not have write permissions for the repository. In which case you can instead tag reviewers by name in a comment by using If you have received no comments on your PR for a week, you can request a review by "ping"ing the PR by adding a comment “Ping”. The common courtesy "ping" rate is once a week. Please remember that you are asking for valuable time from other developers. If you have further questions, they may be answered by the LLVM GitHub User Guide. You can also ask questions in a comment on this PR, on the LLVM Discord or on the forums. |
@llvm/pr-subscribers-mlir-spirv @llvm/pr-subscribers-mlir-affine Author: Filip Laurentiu (FilipLaurentiu) ChangesBuild fail without these imports Full diff: https://github.com/llvm/llvm-project/pull/138550.diff 3 Files Affected:
diff --git a/mlir/include/mlir/Dialect/Affine/IR/ValueBoundsOpInterfaceImpl.h b/mlir/include/mlir/Dialect/Affine/IR/ValueBoundsOpInterfaceImpl.h
index 451c466fa0c95..642e99d963ef6 100644
--- a/mlir/include/mlir/Dialect/Affine/IR/ValueBoundsOpInterfaceImpl.h
+++ b/mlir/include/mlir/Dialect/Affine/IR/ValueBoundsOpInterfaceImpl.h
@@ -10,6 +10,7 @@
#define MLIR_DIALECT_AFFINE_IR_VALUEBOUNDSOPINTERFACEIMPL_H
#include "mlir/Support/LLVM.h"
+#include <cstdint>
namespace mlir {
class DialectRegistry;
diff --git a/mlir/include/mlir/Target/SPIRV/Deserialization.h b/mlir/include/mlir/Target/SPIRV/Deserialization.h
index e39258beeaac8..a346a7fd1e5f7 100644
--- a/mlir/include/mlir/Target/SPIRV/Deserialization.h
+++ b/mlir/include/mlir/Target/SPIRV/Deserialization.h
@@ -15,6 +15,7 @@
#include "mlir/IR/OwningOpRef.h"
#include "mlir/Support/LLVM.h"
+#include <cstdint>
namespace mlir {
class MLIRContext;
diff --git a/mlir/include/mlir/Target/SPIRV/Serialization.h b/mlir/include/mlir/Target/SPIRV/Serialization.h
index 613f0a423f9f8..225777e25d607 100644
--- a/mlir/include/mlir/Target/SPIRV/Serialization.h
+++ b/mlir/include/mlir/Target/SPIRV/Serialization.h
@@ -14,6 +14,7 @@
#define MLIR_TARGET_SPIRV_SERIALIZATION_H
#include "mlir/Support/LLVM.h"
+#include <cstdint>
namespace mlir {
class MLIRContext;
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure what's the process for pushing to a release branch.
@@ -10,6 +10,7 @@ | |||
#define MLIR_DIALECT_AFFINE_IR_VALUEBOUNDSOPINTERFACEIMPL_H | |||
|
|||
#include "mlir/Support/LLVM.h" | |||
#include <cstdint> |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
In general, I believe we cherry-pick fixes commits from |
Maybe I am wrong, but this is not possible in this situation, it's an old release (19.x) and the |
Any updates ? |
The LLVM 19 release is no longer supported. You'll have to apply this as a local patch if you want to build and old LLVM 19 with a new libstdc++. |
Some projects still use LLVM 19. I am not an LLVM developer, not even a C++ developer, but I am working on a project that depends on MLIR, unfortunately building this from scratch is anything but easy. Documentation doesn't help much, and if you found a fix, you should suggest a workaround |
Build fail without these imports