1 """ This module represents an abstraction of an lldb target / host platform. """
3 from __future__
import absolute_import
14 windows
, linux
, macosx
, darwin
, ios
, tvos
, watchos
, bridgeos
, darwin_all
, darwin_embedded
, freebsd
, netbsd
, bsd_all
, android
= range(
25 bridgeos
: ["bridgeos"],
26 darwin_all
: ["macosx", "darwin", "ios", "tvos", "watchos", "bridgeos"],
27 darwin_embedded
: ["ios", "tvos", "watchos", "bridgeos"],
30 bsd_all
: ["freebsd", "netbsd"],
35 def translate(values
):
37 if isinstance(values
, six
.integer_types
):
38 # This is a value from the platform enumeration, translate it.
39 return __name_lookup
[values
]
40 elif isinstance(values
, six
.string_types
):
41 # This is a raw string, return it.
43 elif hasattr(values
, "__iter__"):
44 # This is an iterable, convert each item.
45 result
= [translate(x
) for x
in values
]
46 result
= list(itertools
.chain(*result
))