From 222e2a7620e6520ffaf4fc4e69d79c18da31542e Mon Sep 17 00:00:00 2001 From: "Zancanaro; Carlo" Date: Mon, 24 Sep 2012 09:58:17 +1000 Subject: Add the clang library to the repo (with some of my changes, too). --- clang/test/Lexer/has_feature_modules.m | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 clang/test/Lexer/has_feature_modules.m (limited to 'clang/test/Lexer/has_feature_modules.m') diff --git a/clang/test/Lexer/has_feature_modules.m b/clang/test/Lexer/has_feature_modules.m new file mode 100644 index 0000000..6cea324 --- /dev/null +++ b/clang/test/Lexer/has_feature_modules.m @@ -0,0 +1,25 @@ +// RUN: %clang_cc1 -E -fmodules %s -o - | FileCheck --check-prefix=CHECK-HAS-OBJC-MODULES %s +// RUN: %clang_cc1 -E %s -o - | FileCheck --check-prefix=CHECK-NO-OBJC-MODULES %s +// RUN: %clang_cc1 -E -x c -fmodules %s -o - | FileCheck --check-prefix=CHECK-NO-OBJC-MODULES %s + +// 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 +// RUN: %clang_cc1 -E -x c -fmodules %s -o - | FileCheck --check-prefix=CHECK-HAS-MODULES %s + +#if __has_feature(modules) +int has_modules(); +#else +int no_modules(); +#endif + +// CHECK-HAS-MODULES: has_modules +// CHECK-NO-MODULES: no_modules + +#if __has_feature(objc_modules) +int has_objc_modules(); +#else +int no_objc_modules(); +#endif + +// CHECK-HAS-OBJC-MODULES: has_objc_modules +// CHECK-NO-OBJC-MODULES: no_objc_modules -- cgit v1.2.3