1 //===------- Targets.h - Declare target feature support ---------*- C++ -*-===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
9 // This file declares things required for construction of a TargetInfo object
10 // from a target triple. Typically individual targets will need to include from
11 // here in order to get these functions if required.
13 //===----------------------------------------------------------------------===//
15 #ifndef LLVM_CLANG_LIB_BASIC_TARGETS_H
16 #define LLVM_CLANG_LIB_BASIC_TARGETS_H
18 #include "clang/Basic/LangOptions.h"
19 #include "clang/Basic/MacroBuilder.h"
20 #include "clang/Basic/TargetInfo.h"
21 #include "llvm/ADT/StringRef.h"
26 LLVM_LIBRARY_VISIBILITY
27 std::unique_ptr
<clang::TargetInfo
>
28 AllocateTarget(const llvm::Triple
&Triple
, const clang::TargetOptions
&Opts
);
30 /// DefineStd - Define a macro name and standard variants. For example if
31 /// MacroName is "unix", then this will define "__unix", "__unix__", and "unix"
33 LLVM_LIBRARY_VISIBILITY
34 void DefineStd(clang::MacroBuilder
&Builder
, llvm::StringRef MacroName
,
35 const clang::LangOptions
&Opts
);
37 LLVM_LIBRARY_VISIBILITY
38 void defineCPUMacros(clang::MacroBuilder
&Builder
, llvm::StringRef CPUName
,
41 LLVM_LIBRARY_VISIBILITY
42 void addCygMingDefines(const clang::LangOptions
&Opts
,
43 clang::MacroBuilder
&Builder
);
44 } // namespace targets
46 #endif // LLVM_CLANG_LIB_BASIC_TARGETS_H