forked from OSchip/llvm-project
Centralizing Intel compiler detection logic in lldbtest.py to avoid duplication in the future.
- Addresses review comments from Stefanus! llvm-svn: 187816
This commit is contained in:
parent
433299d015
commit
adaaec9aea
|
@ -56,7 +56,7 @@ class ThreadStepOutTestCase(TestBase):
|
|||
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)')
|
||||
|
|
|
@ -1255,6 +1255,10 @@ class Base(unittest2.TestCase):
|
|||
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.
|
||||
|
|
Loading…
Reference in New Issue