Path: blob/main/contrib/llvm-project/clang/lib/Basic/Targets.h
35233 views
//===------- Targets.h - Declare target feature support ---------*- C++ -*-===//1//2// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.3// See https://llvm.org/LICENSE.txt for license information.4// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception5//6//===----------------------------------------------------------------------===//7//8// This file declares things required for construction of a TargetInfo object9// from a target triple. Typically individual targets will need to include from10// here in order to get these functions if required.11//12//===----------------------------------------------------------------------===//1314#ifndef LLVM_CLANG_LIB_BASIC_TARGETS_H15#define LLVM_CLANG_LIB_BASIC_TARGETS_H1617#include "clang/Basic/LangOptions.h"18#include "clang/Basic/MacroBuilder.h"19#include "clang/Basic/TargetInfo.h"20#include "llvm/ADT/StringRef.h"2122namespace clang {23namespace targets {2425LLVM_LIBRARY_VISIBILITY26std::unique_ptr<clang::TargetInfo>27AllocateTarget(const llvm::Triple &Triple, const clang::TargetOptions &Opts);2829/// DefineStd - Define a macro name and standard variants. For example if30/// MacroName is "unix", then this will define "__unix", "__unix__", and "unix"31/// when in GNU mode.32LLVM_LIBRARY_VISIBILITY33void DefineStd(clang::MacroBuilder &Builder, llvm::StringRef MacroName,34const clang::LangOptions &Opts);3536LLVM_LIBRARY_VISIBILITY37void defineCPUMacros(clang::MacroBuilder &Builder, llvm::StringRef CPUName,38bool Tuning = true);3940LLVM_LIBRARY_VISIBILITY41void addCygMingDefines(const clang::LangOptions &Opts,42clang::MacroBuilder &Builder);43} // namespace targets44} // namespace clang45#endif // LLVM_CLANG_LIB_BASIC_TARGETS_H464748