Remove dead code from LLVM upgrade.

Signed-off-by: Vassil Vassilev <vvasilev@cern.ch>
This commit is contained in:
Roman Zulak 2017-06-08 15:30:03 -04:00 committed by sftnight
parent 72a18c92ab
commit 9ea5a480da

View File

@ -294,55 +294,6 @@ os.environ['CLING_NOHISTORY'] = '1'
# FIXME: Find nicer way to prohibit this.
config.substitutions.append(
(' cling ', """*** Do not use 'cling' in tests, use '%cling'. ***""") )
# Provide on_clone hook for reading 'dg.exp'.
import os
simpleLibData = re.compile(r"""load_lib llvm.exp
RunLLVMTests \[lsort \[glob -nocomplain \$srcdir/\$subdir/\*\.(.*)\]\]""",
re.MULTILINE)
conditionalLibData = re.compile(r"""load_lib llvm.exp
if.*\[ ?(llvm[^ ]*) ([^ ]*) ?\].*{
*RunLLVMTests \[lsort \[glob -nocomplain \$srcdir/\$subdir/\*\.(.*)\]\]
\}""", re.MULTILINE)
def on_clone(parent, cfg, for_path):
def addSuffixes(match):
if match[0] == '{' and match[-1] == '}':
cfg.suffixes = ['.' + s for s in match[1:-1].split(',')]
else:
cfg.suffixes = ['.' + match]
libPath = os.path.join(os.path.dirname(for_path),
'dg.exp')
if not os.path.exists(libPath):
cfg.unsupported = True
return
# Reset unsupported, in case we inherited it.
cfg.unsupported = False
lib = open(libPath).read().strip()
# Check for a simple library.
m = simpleLibData.match(lib)
if m:
addSuffixes(m.group(1))
return
# Check for a conditional test set.
m = conditionalLibData.match(lib)
if m:
funcname,arg,match = m.groups()
addSuffixes(match)
func = globals().get(funcname)
if not func:
lit_config.error('unsupported predicate %r' % funcname)
elif not func(arg):
cfg.unsupported = True
return
# Otherwise, give up.
lit_config.error('unable to understand %r:\n%s' % (libPath, lib))
### Features