Skip to content

Commit a555ca8

Browse files
committed
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
1 parent 118a715 commit a555ca8

File tree

1 file changed

+7
-0
lines changed
  • mlir/include/mlir/Support

1 file changed

+7
-0
lines changed

mlir/include/mlir/Support/LLVM.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,13 @@
2323
#include "llvm/ADT/None.h"
2424
#include "llvm/Support/Casting.h"
2525

26+
// Workaround for clang-5 (PR41549)
27+
#if defined(__clang_major__)
28+
#if __clang_major__ <= 5
29+
#include "llvm/ADT/SmallVector.h"
30+
#endif
31+
#endif
32+
2633
// Forward declarations.
2734
namespace llvm {
2835
// String types

0 commit comments

Comments
 (0)