Skip to content

Conversation

@cota
Copy link
Contributor

@cota cota commented Oct 18, 2023

To forward-declare LLVM's support types.

To forward-declare LLVM's support types.
@cota cota requested review from MacDue and joker-eph October 18, 2023 16:13
@llvmbot llvmbot added mlir:core MLIR Core Infrastructure mlir labels Oct 18, 2023
@llvmbot
Copy link
Member

llvmbot commented Oct 18, 2023

@llvm/pr-subscribers-mlir

@llvm/pr-subscribers-mlir-core

Author: Emilio Cota (cota)

Changes

To forward-declare LLVM's support types.


Full diff: https://github.com/llvm/llvm-project/pull/69479.diff

1 Files Affected:

  • (modified) mlir/include/mlir/Support/ADTExtras.h (+1)
diff --git a/mlir/include/mlir/Support/ADTExtras.h b/mlir/include/mlir/Support/ADTExtras.h
index 1e4708f8f7d3f9e..51ec7ac25dbb599 100644
--- a/mlir/include/mlir/Support/ADTExtras.h
+++ b/mlir/include/mlir/Support/ADTExtras.h
@@ -9,6 +9,7 @@
 #ifndef MLIR_SUPPORT_ADTEXTRAS_H
 #define MLIR_SUPPORT_ADTEXTRAS_H
 
+#include "mlir/Support/LLVM.h"
 #include "llvm/ADT/ArrayRef.h"
 #include "llvm/ADT/SmallVector.h"
 

@MacDue
Copy link
Member

MacDue commented Oct 18, 2023

Is this required? I assumed the complete definitions of SmallVector/ArrayRef would be enough (and required) here.

@cota
Copy link
Contributor Author

cota commented Oct 18, 2023

It is required for Bazel builds, which requires self-contained header files.

An alternative would be to prepend llvm:: to these in the file.

@MacDue
Copy link
Member

MacDue commented Oct 18, 2023

Ah, in that case this LGTM

@cota cota merged commit ecd3934 into llvm:main Oct 18, 2023
@cota
Copy link
Contributor Author

cota commented Oct 18, 2023

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mlir:core MLIR Core Infrastructure mlir

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants