Lines Matching refs:LangOpts
100 static bool hasFeature(StringRef Feature, const LangOptions &LangOpts, in hasFeature() argument
103 .Case("altivec", LangOpts.AltiVec) in hasFeature()
104 .Case("blocks", LangOpts.Blocks) in hasFeature()
105 .Case("coroutines", LangOpts.Coroutines) in hasFeature()
106 .Case("cplusplus", LangOpts.CPlusPlus) in hasFeature()
107 .Case("cplusplus11", LangOpts.CPlusPlus11) in hasFeature()
108 .Case("cplusplus14", LangOpts.CPlusPlus14) in hasFeature()
109 .Case("cplusplus17", LangOpts.CPlusPlus17) in hasFeature()
110 .Case("cplusplus20", LangOpts.CPlusPlus20) in hasFeature()
111 .Case("cplusplus23", LangOpts.CPlusPlus23) in hasFeature()
112 .Case("cplusplus26", LangOpts.CPlusPlus26) in hasFeature()
113 .Case("c99", LangOpts.C99) in hasFeature()
114 .Case("c11", LangOpts.C11) in hasFeature()
115 .Case("c17", LangOpts.C17) in hasFeature()
116 .Case("c23", LangOpts.C23) in hasFeature()
117 .Case("freestanding", LangOpts.Freestanding) in hasFeature()
118 .Case("gnuinlineasm", LangOpts.GNUAsm) in hasFeature()
119 .Case("objc", LangOpts.ObjC) in hasFeature()
120 .Case("objc_arc", LangOpts.ObjCAutoRefCount) in hasFeature()
121 .Case("opencl", LangOpts.OpenCL) in hasFeature()
123 .Case("zvector", LangOpts.ZVector) in hasFeature()
127 HasFeature = llvm::is_contained(LangOpts.ModuleFeatures, Feature); in hasFeature()
131 bool Module::isUnimportable(const LangOptions &LangOpts, in isUnimportable() argument
143 if (hasFeature(Current->Requirements[I].first, LangOpts, Target) != in isUnimportable()
160 bool Module::isForBuilding(const LangOptions &LangOpts) const { in isForBuilding()
162 StringRef CurrentModule = LangOpts.CurrentModule; in isForBuilding()
167 if (!LangOpts.isCompilingModule() && getTopLevelModule()->IsFramework && in isForBuilding()
168 CurrentModule == LangOpts.ModuleName && in isForBuilding()
176 bool Module::isAvailable(const LangOptions &LangOpts, const TargetInfo &Target, in isAvailable() argument
183 if (isUnimportable(LangOpts, Target, Req, ShadowingModule)) in isAvailable()
316 const LangOptions &LangOpts, in addRequirement() argument
321 if (hasFeature(Feature, LangOpts, Target) == RequiredState) in addRequirement()