summaryrefslogtreecommitdiff
path: root/test/libcxxabi
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2016-12-02 22:14:59 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2016-12-02 22:14:59 +0000
commit6d9aad0608e8a3012bd84b76033b81ae234d4fef (patch)
tree222a070aba4dcfa5d74b8ddae5bdd685ec82b6c4 /test/libcxxabi
parentb126ca07d6526844f766a271a7b117c4273b652f (diff)
Check for SD-6 feature test macro when determining which tests should be
available, rather than #ifdef'ing away the relevant tests if it's unavailable. git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@288543 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/libcxxabi')
-rw-r--r--test/libcxxabi/test/config.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/libcxxabi/test/config.py b/test/libcxxabi/test/config.py
index 3d5a235..5349338 100644
--- a/test/libcxxabi/test/config.py
+++ b/test/libcxxabi/test/config.py
@@ -33,10 +33,15 @@ class Configuration(LibcxxConfiguration):
self.libcxxabi_obj_root = self.get_lit_conf('libcxxabi_obj_root')
super(Configuration, self).configure_obj_root()
+ def has_cpp_feature(self, feature, required_value):
+ return int(self.cxx.dumpMacros().get('__cpp_' + feature, 0)) >= required_value
+
def configure_features(self):
super(Configuration, self).configure_features()
if not self.get_lit_bool('enable_exceptions', True):
self.config.available_features.add('libcxxabi-no-exceptions')
+ if not self.has_cpp_feature('noexcept_function_type', 201510):
+ self.config.available_features.add('libcxxabi-no-noexcept-function-type')
def configure_compile_flags(self):
self.cxx.compile_flags += ['-DLIBCXXABI_NO_TIMER']