//===- LangOptions.h - C Language Family Language Options -------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// // /// \file /// Defines the clang::LangOptions interface. // //===----------------------------------------------------------------------===// #ifndef LLVM_CLANG_BASIC_LANGOPTIONS_H #define LLVM_CLANG_BASIC_LANGOPTIONS_H #include "clang/Basic/CommentOptions.h" #include "clang/Basic/LLVM.h" #include "clang/Basic/LangStandard.h" #include "clang/Basic/ObjCRuntime.h" #include "clang/Basic/Sanitizers.h" #include "clang/Basic/TargetCXXABI.h" #include "clang/Basic/Visibility.h" #include "llvm/ADT/FloatingPointMode.h" #include "llvm/ADT/StringRef.h" #include "llvm/TargetParser/Triple.h" #include <optional> #include <string> #include <vector> namespace clang { /// In the Microsoft ABI, this controls the placement of virtual displacement /// members used to implement virtual inheritance. enum class MSVtorDispMode { … }; /// Shader programs run in specific pipeline stages. /// The order of these values matters, and must be kept in sync with the /// Triple Environment enum in llvm::Triple. The ordering is enforced in /// static_asserts in Triple.cpp and in clang/Basic/HLSLRuntime.h. enum class ShaderStage { … }; enum class PointerAuthenticationMode : unsigned { … }; /// Bitfields of LangOptions, split out from LangOptions in order to ensure that /// this large collection of bitfields is a trivial class type. class LangOptionsBase { … }; /// Keeps track of the various options that can be /// enabled, which controls the dialect of C or C++ that is accepted. class LangOptions : public LangOptionsBase { … }; /// Floating point control options class FPOptionsOverride; class FPOptions { … }; /// Represents difference between two FPOptions values. /// /// The effect of language constructs changing the set of floating point options /// is usually a change of some FP properties while leaving others intact. This /// class describes such changes by keeping information about what FP options /// are overridden. /// /// The integral set of FP options, described by the class FPOptions, may be /// represented as a default FP option set, defined by language standard and /// command line options, with the overrides introduced by pragmas. /// /// The is implemented as a value of the new FPOptions plus a mask showing which /// fields are actually set in it. class FPOptionsOverride { … }; inline FPOptionsOverride FPOptions::getChangesFrom(const FPOptions &Base) const { … } inline void FPOptions::applyChanges(FPOptionsOverride FPO) { … } /// Describes the kind of translation unit being processed. enum TranslationUnitKind { … }; } // namespace clang #endif // LLVM_CLANG_BASIC_LANGOPTIONS_H