summaryrefslogtreecommitdiff
path: root/libc/src/__support/macros/properties/compiler.h
blob: 54bcf84d927b1963677635d307ea0857c6c279d7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
//===-- Compile time compiler detection -------------------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef LLVM_LIBC_SUPPORT_MACROS_PROPERTIES_COMPILER_H
#define LLVM_LIBC_SUPPORT_MACROS_PROPERTIES_COMPILER_H

#if defined(__clang__)
#define LIBC_COMPILER_IS_CLANG
#endif

#if defined(__GNUC__) && !defined(__clang__)
#define LIBC_COMPILER_IS_GCC
#endif

#if defined(_MSC_VER)
#define LIBC_COMPILER_IS_MSC
#endif

#endif // LLVM_LIBC_SUPPORT_MACROS_PROPERTIES_COMPILER_H