clang 20.0.0git
TargetDefines.h
Go to the documentation of this file.
1//===------- TargetDefines.h - Target define helpers ------------*- C++ -*-===//
2//
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
6//
7//===----------------------------------------------------------------------===//
8//
9// This file declares a series of helper functions for defining target-specific
10// macros.
11//
12//===----------------------------------------------------------------------===//
13
14#ifndef LLVM_CLANG_LIB_BASIC_TARGETDEFINES_H
15#define LLVM_CLANG_LIB_BASIC_TARGETDEFINES_H
16
19#include "llvm/ADT/StringRef.h"
20
21namespace clang {
22namespace targets {
23/// Define a macro name and standard variants. For example if MacroName is
24/// "unix", then this will define "__unix", "__unix__", and "unix" when in GNU
25/// mode.
26LLVM_LIBRARY_VISIBILITY
27void DefineStd(clang::MacroBuilder &Builder, llvm::StringRef MacroName,
28 const clang::LangOptions &Opts);
29
30LLVM_LIBRARY_VISIBILITY
31void defineCPUMacros(clang::MacroBuilder &Builder, llvm::StringRef CPUName,
32 bool Tuning = true);
33
34LLVM_LIBRARY_VISIBILITY
36 clang::MacroBuilder &Builder);
37} // namespace targets
38} // namespace clang
39#endif // LLVM_CLANG_LIB_BASIC_TARGETDEFINES_H
Defines the clang::LangOptions interface.
Defines the clang::MacroBuilder utility class.
Keeps track of the various options that can be enabled, which controls the dialect of C or C++ that i...
Definition: LangOptions.h:499
LLVM_LIBRARY_VISIBILITY void defineCPUMacros(clang::MacroBuilder &Builder, llvm::StringRef CPUName, bool Tuning=true)
LLVM_LIBRARY_VISIBILITY void addCygMingDefines(const clang::LangOptions &Opts, clang::MacroBuilder &Builder)
Definition: Targets.cpp:83
LLVM_LIBRARY_VISIBILITY void DefineStd(clang::MacroBuilder &Builder, llvm::StringRef MacroName, const clang::LangOptions &Opts)
Define a macro name and standard variants.
The JSON file list parser is used to communicate input to InstallAPI.