Author: Mehdi Amini Date: 2020-12-18T00:00:36Z New Revision: a555ca8b3d67267c19db48fc2470d20daae80aeb
URL: https://github.com/llvm/llvm-project/commit/a555ca8b3d67267c19db48fc2470d20daae80aeb DIFF: https://github.com/llvm/llvm-project/commit/a555ca8b3d67267c19db48fc2470d20daae80aeb.diff LOG: Workaround around clang 5.0 bug by including SmallVector.h in LLVM.h (PR41549) The forward declaration for SmallVector does not play well with clang-5. Differential Revision: https://reviews.llvm.org/D93498 Added: Modified: mlir/include/mlir/Support/LLVM.h Removed: ################################################################################ diff --git a/mlir/include/mlir/Support/LLVM.h b/mlir/include/mlir/Support/LLVM.h index e8595ae29ed7..ced7a7a35363 100644 --- a/mlir/include/mlir/Support/LLVM.h +++ b/mlir/include/mlir/Support/LLVM.h @@ -23,6 +23,13 @@ #include "llvm/ADT/None.h" #include "llvm/Support/Casting.h" +// Workaround for clang-5 (PR41549) +#if defined(__clang_major__) +#if __clang_major__ <= 5 +#include "llvm/ADT/SmallVector.h" +#endif +#endif + // Forward declarations. namespace llvm { // String types _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits