Path: blob/main/contrib/llvm-project/clang/lib/Basic/TargetDefines.h
213766 views
//===------- TargetDefines.h - Target define helpers ------------*- 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 a series of helper functions for defining target-specific9// macros.10//11//===----------------------------------------------------------------------===//1213#ifndef LLVM_CLANG_LIB_BASIC_TARGETDEFINES_H14#define LLVM_CLANG_LIB_BASIC_TARGETDEFINES_H1516#include "clang/Basic/LangOptions.h"17#include "clang/Basic/MacroBuilder.h"18#include "llvm/ADT/StringRef.h"1920namespace clang {21namespace targets {22/// Define a macro name and standard variants. For example if MacroName is23/// "unix", then this will define "__unix", "__unix__", and "unix" when in GNU24/// mode.25LLVM_LIBRARY_VISIBILITY26void DefineStd(clang::MacroBuilder &Builder, llvm::StringRef MacroName,27const clang::LangOptions &Opts);2829LLVM_LIBRARY_VISIBILITY30void defineCPUMacros(clang::MacroBuilder &Builder, llvm::StringRef CPUName,31bool Tuning = true);3233LLVM_LIBRARY_VISIBILITY34void addCygMingDefines(const clang::LangOptions &Opts,35clang::MacroBuilder &Builder);36} // namespace targets37} // namespace clang38#endif // LLVM_CLANG_LIB_BASIC_TARGETDEFINES_H394041