1# -*- Python -*- vim: set ft=python ts=4 sw=4 expandtab tw=79: 2from lit.llvm.subst import ToolSubst 3 4fc = ToolSubst('FileCheck', unresolved='fatal') 5# the parent introduced the opposite rule, so we replace it if we see it. 6if len(config.substitutions) > 0 and config.substitutions[0] == (fc.regex, 'FileCheck --allow-unused-prefixes=false'): 7 config.substitutions[0] = ( 8 fc.regex, 'FileCheck --allow-unused-prefixes=true') 9else: 10 config.substitutions.insert(0, (fc.regex, 11 'FileCheck --allow-unused-prefixes=true')) 12