diff options
author | Zachary Turner <zturner@google.com> | 2014-11-17 18:38:22 +0000 |
---|---|---|
committer | Zachary Turner <zturner@google.com> | 2014-11-17 18:38:22 +0000 |
commit | ca0c84cadead1bcb27c111b11aea848903250fd6 (patch) | |
tree | 46fc48366fc48a3e4f6480a4d9d4ef368e8df3ea /lldb/scripts/buildSwigWrapperClasses.py | |
parent | ce0b8e0fc91395bb4c70af0a381ed9a741cd933e (diff) | |
download | bcm5719-llvm-ca0c84cadead1bcb27c111b11aea848903250fd6.tar.gz bcm5719-llvm-ca0c84cadead1bcb27c111b11aea848903250fd6.zip |
Fix buildSwigWrapperClasses.py after recent break.
A re-ordering of some enum values exposed a lingering bug where an
invalid key was indexing a dictionary.
llvm-svn: 222154
Diffstat (limited to 'lldb/scripts/buildSwigWrapperClasses.py')
-rw-r--r-- | lldb/scripts/buildSwigWrapperClasses.py | 35 |
1 files changed, 28 insertions, 7 deletions
diff --git a/lldb/scripts/buildSwigWrapperClasses.py b/lldb/scripts/buildSwigWrapperClasses.py index 052209b84cf..e4165580f8d 100644 --- a/lldb/scripts/buildSwigWrapperClasses.py +++ b/lldb/scripts/buildSwigWrapperClasses.py @@ -329,8 +329,8 @@ def check_lldb_swig_executable_file_exists_Unknown( vDictArgs ): # Str - Error message. # Throws: None. #-- -def check_lldb_swig_executable_file_exists_windows( vDictArgs ): - dbg = utilsDebug.CDebugFnVerbose( "check_lldb_swig_executable_file_exists_windows()" ); +def check_lldb_swig_executable_file_exists_Windows( vDictArgs ): + dbg = utilsDebug.CDebugFnVerbose( "check_lldb_swig_executable_file_exists_Windows()" ); # Will always be true as it assumed the path to SWIG executable will be # in the OS system environmental variable %PATH%. Easier this way as the @@ -391,7 +391,26 @@ def check_lldb_swig_executable_file_exists_Darwin( vDictArgs ): strStatusMsg = "Sorry function 'check_lldb_swig_executable_file_exists_Darwin()' is not implemented"; return (bExeFileFound, strStatusMsg); + +#++--------------------------------------------------------------------------- +# Details: Locate the SWIG executable file in a OSX system. Several hard +# coded predetermined possible file path locations are searched. +# (This is good candidate for a derived class object) +# Args: vDictArgs - (W) Program input parameters. +# Returns: Bool - True = Success. +# - False = Failure file not found. +# Str - Error message. +# Throws: None. +#-- +def check_lldb_swig_executable_file_exists_FreeBSD( vDictArgs ): + dbg = utilsDebug.CDebugFnVerbose( "check_lldb_swig_executable_file_exists_FreeBSD()" ); + bExeFileFound = False; + # ToDo: Find the SWIG executable and add the path to the args dictionary + #vDictArgs.[ "--swigExePath" ] = "/usr/bin/swig"; + strStatusMsg = "Sorry function 'check_lldb_swig_executable_file_exists_FreeBSD()' is not implemented"; + return (bExeFileFound, strStatusMsg); + #++--------------------------------------------------------------------------- # Details: Locate the SWIG executable file. Several hard coded predetermined # possible file path locations are searched. @@ -406,11 +425,13 @@ def check_lldb_swig_executable_file_exists( vDictArgs, veOSType ): dbg = utilsDebug.CDebugFnVerbose( "check_lldb_swig_executable_file_exists()" ); bExeFileFound = False; strStatusMsg = ""; - - switch = { 0 : check_lldb_swig_executable_file_exists_Unknown, - 1 : check_lldb_swig_executable_file_exists_windows, - 2 : check_lldb_swig_executable_file_exists_Linux, - 3 : check_lldb_swig_executable_file_exists_Darwin } + from utilsOsType import EnumOsType; + + switch = { EnumOsType.Unknown : check_lldb_swig_executable_file_exists_Unknown, + EnumOsType.Darwin : check_lldb_swig_executable_file_exists_Darwin, + EnumOsType.FreeBSD : check_lldb_swig_executable_file_exists_FreeBSD, + EnumOsType.Linux : check_lldb_swig_executable_file_exists_Linux, + EnumOsType.Windows : check_lldb_swig_executable_file_exists_Windows } bExeFileFound, strStatusMsg = switch[ veOSType ]( vDictArgs ); return (bExeFileFound, strStatusMsg); |