This patch fixes the following unit tests when the lldb unit tests are run on ubuntu
TestAnonymous.py TestSharedLib.py TestSharedLibStrippedSymbols.py TestUniqueTypes.py
The unit tests fail when lldb is configured/built with ccache or when the individual unit tests are built with ccache. Under these conditions, the "compiler" variable in lldbtest.py's getCompilerVersion() contains the ccache prefix or compiler options in addition to the compiler name. The which() function in lldbutil does not handle multiple words well and returns "None" - even though clang is embedded in the compiler name.
This patch strips off any prefixes and/or options by looking for the last word in the compiler variable that appears to be an executable and then discarding everything else.
Doug