[libcxx-commits] [PATCH] D98045: [libcxx] [test] Move the is_<platform> functions down to subclasses

Martin Storsjö via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Fri Mar 5 23:10:13 PST 2021


This revision was automatically updated to reflect the committed changes.
Closed by commit rG714644a36c30: [libcxx] [test] Move the is_<platform> functions down to subclasses (authored by mstorsjo).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D98045/new/

https://reviews.llvm.org/D98045

Files:
  libcxx/utils/libcxx/test/target_info.py


Index: libcxx/utils/libcxx/test/target_info.py
===================================================================
--- libcxx/utils/libcxx/test/target_info.py
+++ libcxx/utils/libcxx/test/target_info.py
@@ -25,13 +25,13 @@
         return sys.platform.lower().strip()
 
     def is_windows(self):
-        return self.platform() == 'win32'
+        return False
 
     def is_mingw(self):
         return False
 
     def is_darwin(self):
-        return self.platform() == 'darwin'
+        return False
 
     def add_cxx_flags(self, flags): pass
     def add_cxx_compile_flags(self, flags): pass
@@ -53,6 +53,9 @@
     def __init__(self, full_config):
         super(DarwinLocalTI, self).__init__(full_config)
 
+    def is_darwin(self):
+        return True
+
     def is_host_macosx(self):
         name = lit.util.to_string(subprocess.check_output(['sw_vers', '-productName'])).strip()
         return name == "Mac OS X"
@@ -187,6 +190,9 @@
     def __init__(self, full_config):
         super(WindowsLocalTI, self).__init__(full_config)
 
+    def is_windows(self):
+        return True
+
 class MingwLocalTI(WindowsLocalTI):
     def __init__(self, full_config):
         super(MingwLocalTI, self).__init__(full_config)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D98045.328741.patch
Type: text/x-patch
Size: 1228 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20210306/abd6767a/attachment-0001.bin>


More information about the libcxx-commits mailing list