summaryrefslogtreecommitdiffstats
path: root/lldb/scripts
diff options
context:
space:
mode:
authorEd Maste <emaste@freebsd.org>2014-11-17 15:37:59 +0000
committerEd Maste <emaste@freebsd.org>2014-11-17 15:37:59 +0000
commit0178e7587e5091ce47f7fa10f6b3e16bc5be915f (patch)
tree305abca3924fb23579ada4280080b726aafb26e4 /lldb/scripts
parent9251e2e61c07caee50209ef11085328e30dcf9ec (diff)
downloadbcm5719-llvm-0178e7587e5091ce47f7fa10f6b3e16bc5be915f.tar.gz
bcm5719-llvm-0178e7587e5091ce47f7fa10f6b3e16bc5be915f.zip
Whitespace cleanup and remove non-canonical headers
llvm-svn: 222135
Diffstat (limited to 'lldb/scripts')
-rw-r--r--lldb/scripts/utilsOsType.py94
1 files changed, 43 insertions, 51 deletions
diff --git a/lldb/scripts/utilsOsType.py b/lldb/scripts/utilsOsType.py
index 6810b362492..faef7498bad 100644
--- a/lldb/scripts/utilsOsType.py
+++ b/lldb/scripts/utilsOsType.py
@@ -1,25 +1,17 @@
""" Utility module to determine the OS Python running on
- --------------------------------------------------------------------------
- File: utilsOsType.py
+ --------------------------------------------------------------------------
+ File: utilsOsType.py
- Overview: Python module to supply functions and an enumeration to
- help determine the platform type, bit size and OS currently
- being used.
-
- Environment: OS: Windows/LINUX/OSX
- IDE: Visual Studio 2013 Plugin Python Tools (PTVS)
- Script: Python 2.6 x64
+ Overview: Python module to supply functions and an enumeration to
+ help determine the platform type, bit size and OS currently
+ being used.
+ --------------------------------------------------------------------------
- Gotchas: None.
-
- Copyright: None.
- --------------------------------------------------------------------------
-
"""
# Python modules:
-import sys # Provide system information
+import sys # Provide system information
# Third party modules:
@@ -29,54 +21,54 @@ import sys # Provide system information
# Enumerations:
#-----------------------------------------------------------------------------
-# Details: Class to implement a 'C' style enumeration type.
-# Gotchas: None.
-# Authors: Illya Rudkin 28/11/2013.
-# Changes: None.
+# Details: Class to implement a 'C' style enumeration type.
+# Gotchas: None.
+# Authors: Illya Rudkin 28/11/2013.
+# Changes: None.
#--
class EnumOsType( object ):
- values = [ "Unknown",
- "Windows",
- "Linux",
- "Darwin" ]; # OSX
- class __metaclass__( type ):
+ values = [ "Unknown",
+ "Windows",
+ "Linux",
+ "Darwin" ]; # OSX
+ class __metaclass__( type ):
#++---------------------------------------------------------------------------
-# Details: Fn acts as an enumeration.
-# Args: vName - (R) Enumeration to match.
-# Returns: Int - Matching enumeration/index.
-# Throws: None.
+# Details: Fn acts as an enumeration.
+# Args: vName - (R) Enumeration to match.
+# Returns: Int - Matching enumeration/index.
+# Throws: None.
#--
- def __getattr__( self, vName ):
- return self.values.index( vName );
+ def __getattr__( self, vName ):
+ return self.values.index( vName );
#++---------------------------------------------------------------------------
-# Details: Reverse fast lookup of the values list.
-# Args: vI - (R) Index / enumeration.
-# Returns: Str - text description matching enumeration.
-# Throws: None.
+# Details: Reverse fast lookup of the values list.
+# Args: vI - (R) Index / enumeration.
+# Returns: Str - text description matching enumeration.
+# Throws: None.
#--
- def name_of( self, vI ):
- return EnumOsType.values[ vI ];
+ def name_of( self, vI ):
+ return EnumOsType.values[ vI ];
#-----------------------------------------------------------------------------
#-----------------------------------------------------------------------------
#-----------------------------------------------------------------------------
#++---------------------------------------------------------------------------
-# Details: Determine what operating system is currently running on.
-# Args: None.
-# Returns: EnumOsType - The OS type being used ATM.
-# Throws: None.
+# Details: Determine what operating system is currently running on.
+# Args: None.
+# Returns: EnumOsType - The OS type being used ATM.
+# Throws: None.
#--
def determine_os_type():
- eOSType = EnumOsType.Unknown;
-
- strOS = sys.platform
- if strOS == "win32":
- eOSType = EnumOsType.Windows;
- elif (strOS == "linux") or (strOS == "linux2"):
- eOSType = EnumOsType.Linux;
- elif strOS == "darwin":
- eOSType == EnumOsType.Darwin;
-
- return eOSType;
+ eOSType = EnumOsType.Unknown;
+
+ strOS = sys.platform
+ if strOS == "win32":
+ eOSType = EnumOsType.Windows;
+ elif (strOS == "linux") or (strOS == "linux2"):
+ eOSType = EnumOsType.Linux;
+ elif strOS == "darwin":
+ eOSType == EnumOsType.Darwin;
+
+ return eOSType;
OpenPOWER on IntegriCloud