Centralizing Intel compiler detection logic in lldbtest.py to avoid duplication in the future.
- Addresses review comments from Stefanus!



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@187816 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/functionalities/thread/step_out/TestThreadStepOut.py b/test/functionalities/thread/step_out/TestThreadStepOut.py
index ac8d15e..12cbd80 100644
--- a/test/functionalities/thread/step_out/TestThreadStepOut.py
+++ b/test/functionalities/thread/step_out/TestThreadStepOut.py
@@ -56,7 +56,7 @@
         TestBase.setUp(self)
         # Find the line number for our breakpoint.
         self.breakpoint = line_number('main.cpp', '// Set breakpoint here')
-        if any([x in self.getCompiler() for x in ["gcc", "icc", "icpc", "icl"]]):
+        if "gcc" in self.getCompiler() or self.isIntelCompiler(): 
             self.step_out_destination = line_number('main.cpp', '// Expect to stop here after step-out (icc and gcc)')
         else:
             self.step_out_destination = line_number('main.cpp', '// Expect to stop here after step-out (clang)')
diff --git a/test/lldbtest.py b/test/lldbtest.py
index 32d51b7..c6fb798 100644
--- a/test/lldbtest.py
+++ b/test/lldbtest.py
@@ -1255,6 +1255,10 @@
                 version = m.group(1)
         return version
 
+    def isIntelCompiler(self):
+        """ Returns true if using an Intel (ICC) compiler, false otherwise. """
+        return any([x in self.getCompiler() for x in ["icc", "icpc", "icl"]])
+
     def expectedCompilerVersion(self, compiler_version):
         """Returns True iff compiler_version[1] matches the current compiler version.
            Use compiler_version[0] to specify the operator used to determine if a match has occurred.