forked from OSchip/llvm-project
parent
493c1b3152
commit
173d499c25
|
@ -617,6 +617,7 @@ static bool HasFeature(const Preprocessor &PP, const IdentifierInfo *II) {
|
||||||
LangOpts.ObjCRuntimeHasWeak)
|
LangOpts.ObjCRuntimeHasWeak)
|
||||||
.Case("objc_fixed_enum", LangOpts.ObjC2)
|
.Case("objc_fixed_enum", LangOpts.ObjC2)
|
||||||
.Case("objc_instancetype", LangOpts.ObjC2)
|
.Case("objc_instancetype", LangOpts.ObjC2)
|
||||||
|
.Case("objc_modules", LangOpts.Modules)
|
||||||
.Case("objc_nonfragile_abi", LangOpts.ObjCNonFragileABI)
|
.Case("objc_nonfragile_abi", LangOpts.ObjCNonFragileABI)
|
||||||
.Case("objc_weak_class", LangOpts.ObjCNonFragileABI)
|
.Case("objc_weak_class", LangOpts.ObjCNonFragileABI)
|
||||||
.Case("ownership_holds", true)
|
.Case("ownership_holds", true)
|
||||||
|
|
|
@ -0,0 +1,11 @@
|
||||||
|
// RUN: %clang_cc1 -E -fmodules %s -o - | FileCheck --check-prefix=CHECK-HAS-MODULES %s
|
||||||
|
// RUN: %clang_cc1 -E %s -o - | FileCheck --check-prefix=CHECK-NO-MODULES %s
|
||||||
|
|
||||||
|
#if __has_feature(objc_modules)
|
||||||
|
int has_modules();
|
||||||
|
#else
|
||||||
|
int no_modules();
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// CHECK-HAS-MODULES: has_modules
|
||||||
|
// CHECK-NO-MODULES: no_modules
|
Loading…
Reference in New Issue