#include "clang/Basic/FileManager.h"
#include "clang/Basic/HLSLRuntime.h"
#include "clang/Basic/MacroBuilder.h"
#include "clang/Basic/SourceManager.h"
#include "clang/Basic/SyncScope.h"
#include "clang/Basic/TargetInfo.h"
#include "clang/Basic/Version.h"
#include "clang/Frontend/FrontendDiagnostic.h"
#include "clang/Frontend/FrontendOptions.h"
#include "clang/Frontend/Utils.h"
#include "clang/Lex/HeaderSearch.h"
#include "clang/Lex/Preprocessor.h"
#include "clang/Lex/PreprocessorOptions.h"
#include "clang/Serialization/ASTReader.h"
#include "llvm/ADT/APFloat.h"
#include "llvm/IR/DataLayout.h"
#include "llvm/IR/DerivedTypes.h"
usingnamespaceclang;
static bool MacroBodyEndsInBackslash(StringRef MacroBody) { … }
static void DefineBuiltinMacro(MacroBuilder &Builder, StringRef Macro,
DiagnosticsEngine &Diags) { … }
static void AddImplicitInclude(MacroBuilder &Builder, StringRef File) { … }
static void AddImplicitIncludeMacros(MacroBuilder &Builder, StringRef File) { … }
static void AddImplicitIncludePCH(MacroBuilder &Builder, Preprocessor &PP,
const PCHContainerReader &PCHContainerRdr,
StringRef ImplicitIncludePCH) { … }
template <typename T>
static T PickFP(const llvm::fltSemantics *Sem, T IEEEHalfVal, T IEEESingleVal,
T IEEEDoubleVal, T X87DoubleExtendedVal, T PPCDoubleDoubleVal,
T IEEEQuadVal) { … }
static void DefineFloatMacros(MacroBuilder &Builder, StringRef Prefix,
const llvm::fltSemantics *Sem, StringRef Ext) { … }
static void DefineTypeSize(const Twine &MacroName, unsigned TypeWidth,
StringRef ValSuffix, bool isSigned,
MacroBuilder &Builder) { … }
static void DefineTypeSize(const Twine &MacroName, TargetInfo::IntType Ty,
const TargetInfo &TI, MacroBuilder &Builder) { … }
static void DefineFmt(const LangOptions &LangOpts, const Twine &Prefix,
TargetInfo::IntType Ty, const TargetInfo &TI,
MacroBuilder &Builder) { … }
static void DefineType(const Twine &MacroName, TargetInfo::IntType Ty,
MacroBuilder &Builder) { … }
static void DefineTypeWidth(const Twine &MacroName, TargetInfo::IntType Ty,
const TargetInfo &TI, MacroBuilder &Builder) { … }
static void DefineTypeSizeof(StringRef MacroName, unsigned BitWidth,
const TargetInfo &TI, MacroBuilder &Builder) { … }
static void DefineTypeSizeAndWidth(const Twine &Prefix, TargetInfo::IntType Ty,
const TargetInfo &TI,
MacroBuilder &Builder) { … }
static void DefineExactWidthIntType(const LangOptions &LangOpts,
TargetInfo::IntType Ty,
const TargetInfo &TI,
MacroBuilder &Builder) { … }
static void DefineExactWidthIntTypeSize(TargetInfo::IntType Ty,
const TargetInfo &TI,
MacroBuilder &Builder) { … }
static void DefineLeastWidthIntType(const LangOptions &LangOpts,
unsigned TypeWidth, bool IsSigned,
const TargetInfo &TI,
MacroBuilder &Builder) { … }
static void DefineFastIntType(const LangOptions &LangOpts, unsigned TypeWidth,
bool IsSigned, const TargetInfo &TI,
MacroBuilder &Builder) { … }
static const char *getLockFreeValue(unsigned TypeWidth, const TargetInfo &TI) { … }
static void AddObjCXXARCLibstdcxxDefines(const LangOptions &LangOpts,
MacroBuilder &Builder) { … }
static void InitializeStandardPredefinedMacros(const TargetInfo &TI,
const LangOptions &LangOpts,
const FrontendOptions &FEOpts,
MacroBuilder &Builder) { … }
static void InitializeCPlusPlusFeatureTestMacros(const LangOptions &LangOpts,
MacroBuilder &Builder) { … }
void InitializeOpenCLFeatureTestMacros(const TargetInfo &TI,
const LangOptions &Opts,
MacroBuilder &Builder) { … }
llvm::SmallString<32> ConstructFixedPointLiteral(llvm::APFixedPoint Val,
llvm::StringRef Suffix) { … }
void DefineFixedPointMacros(const TargetInfo &TI, MacroBuilder &Builder,
llvm::StringRef TypeName, llvm::StringRef Suffix,
unsigned Width, unsigned Scale, bool Signed) { … }
static void InitializePredefinedMacros(const TargetInfo &TI,
const LangOptions &LangOpts,
const FrontendOptions &FEOpts,
const PreprocessorOptions &PPOpts,
MacroBuilder &Builder) { … }
static void InitializePGOProfileMacros(const CodeGenOptions &CodeGenOpts,
MacroBuilder &Builder) { … }
void clang::InitializePreprocessor(Preprocessor &PP,
const PreprocessorOptions &InitOpts,
const PCHContainerReader &PCHContainerRdr,
const FrontendOptions &FEOpts,
const CodeGenOptions &CodeGenOpts) { … }