clang 8.0.0

Targets.h
Go to the documentation of this file.
1 //===------- Targets.h - Declare target feature support ---------*- C++ -*-===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This file declares things required for construction of a TargetInfo object
11 // from a target triple. Typically individual targets will need to include from
12 // here in order to get these functions if required.
13 //
14 //===----------------------------------------------------------------------===//
15
16 #ifndef LLVM_CLANG_LIB_BASIC_TARGETS_H
17 #define LLVM_CLANG_LIB_BASIC_TARGETS_H
18
19 #include "clang/Basic/LangOptions.h"
20 #include "clang/Basic/MacroBuilder.h"
21 #include "clang/Basic/TargetInfo.h"
22 #include "llvm/ADT/StringRef.h"
23
24 namespace clang {
25 namespace targets {
26
27 LLVM_LIBRARY_VISIBILITY
28 clang::TargetInfo *AllocateTarget(const llvm::Triple &Triple,
29 const clang::TargetOptions &Opts);
30
31 /// DefineStd - Define a macro name and standard variants. For example if
32 /// MacroName is "unix", then this will define "__unix", "__unix__", and "unix"
33 /// when in GNU mode.
34 LLVM_LIBRARY_VISIBILITY
35 void DefineStd(clang::MacroBuilder &Builder, llvm::StringRef MacroName,
36 const clang::LangOptions &Opts);
37
38 LLVM_LIBRARY_VISIBILITY
39 void defineCPUMacros(clang::MacroBuilder &Builder, llvm::StringRef CPUName,
40 bool Tuning = true);
41
42 LLVM_LIBRARY_VISIBILITY
43 void addMinGWDefines(const llvm::Triple &Triple, const clang::LangOptions &Opts,
44 clang::MacroBuilder &Builder);
45
46 LLVM_LIBRARY_VISIBILITY
47 void addCygMingDefines(const clang::LangOptions &Opts,
48 clang::MacroBuilder &Builder);
49 } // namespace targets
50 } // namespace clang
51 #endif // LLVM_CLANG_LIB_BASIC_TARGETS_H
clang::targets::DefineStd
void DefineStd(MacroBuilder &Builder, StringRef MacroName, const LangOptions &Opts)
DefineStd - Define a macro name and standard variants.
Definition: Targets.cpp:55
MacroBuilder.h
Defines the clang::MacroBuilder utility class.
clang::TargetOptions
Options for controlling the target.
Definition: TargetOptions.h:27
clang::LangOptions
Keeps track of the various options that can be enabled, which controls the dialect of C or C++ that i...
Definition: LangOptions.h:50
clang::targets::addMinGWDefines
void addMinGWDefines(const llvm::Triple &Triple, const LangOptions &Opts, MacroBuilder &Builder)
Definition: Targets.cpp:102
clang::TargetInfo
Exposes information about the current target.
Definition: TargetInfo.h:54
LangOptions.h
Defines the clang::LangOptions interface.
clang::targets::AllocateTarget
TargetInfo * AllocateTarget(const llvm::Triple &Triple, const TargetOptions &Opts)
Definition: Targets.cpp:119
clang::targets::addCygMingDefines
void addCygMingDefines(const LangOptions &Opts, MacroBuilder &Builder)
Definition: Targets.cpp:78
clang
Dataflow Directional Tag Classes.
Definition: CFGReachabilityAnalysis.h:22
clang::MacroBuilder
Definition: MacroBuilder.h:24
TargetInfo.h
Defines the clang::TargetInfo interface.
clang::targets::defineCPUMacros
void defineCPUMacros(MacroBuilder &Builder, StringRef CPUName, bool Tuning)
Definition: Targets.cpp:71