Skip to content

Commit c60741f

Browse files
committed
[NFC] Check for defined(__GNUC__) before use
This silences some spurious warnings on Windows builds that __GNUC__ is not defined. These warnings make Windows builds very noisy.
1 parent 9b016e3 commit c60741f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

llvm/include/llvm/ADT/iterator_range.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@ class iterator_range {
4343
IteratorT begin_iterator, end_iterator;
4444

4545
public:
46-
#if __GNUC__ == 7 || (__GNUC__ == 8 && __GNUC_MINOR__ < 4)
46+
#if defined(__GNUC__) && \
47+
(__GNUC__ == 7 || (__GNUC__ == 8 && __GNUC_MINOR__ < 4))
4748
// Be careful no to break gcc-7 and gcc-8 < 8.4 on the mlir target.
4849
// See https://github.com/llvm/llvm-project/issues/63843
4950
template <typename Container>

0 commit comments

Comments
 (0)