[cfe-commits] r80593 - in /cfe/trunk/test/Preprocessor: non_fragile_feature.m non_fragile_feature1.m
Sebastian Redl
sebastian.redl at getdesigned.at
Mon Aug 31 13:32:37 PDT 2009
David Chisnall wrote:
> Author: theraven
> Date: Mon Aug 31 11:53:06 2009
> New Revision: 80593
>
> URL: http://llvm.org/viewvc/llvm-project?rev=80593&view=rev
> Log:
> Added test cases for presence and absence of __has_feature(objc_nonfragile_abi) with and without -fobjc-nonfragile-abi.
>
>
> Added:
> cfe/trunk/test/Preprocessor/non_fragile_feature.m
> - copied, changed from r80437, cfe/trunk/test/Preprocessor/feature_tests.c
> cfe/trunk/test/Preprocessor/non_fragile_feature1.m
> - copied, changed from r80437, cfe/trunk/test/Preprocessor/feature_tests.c
>
Why two files? This could be done like this:
// RUN: clang-cc -Dwant_feature=1 -fobjc-nonfragile-abi %s
// RUN: clang-cc %s
#if defined(want_feature) && !__has_feature(objc_nonfragile_abi)
#error Want nonfragile ABI but do not have it
#elif !defined(want_feature) && __has_feature(objc_nonfragile_abi)
#error Do not want nonfragile ABI but have it
#endif
Sebastian
More information about the cfe-commits
mailing list