This un-breaks a lit workflow where you run lit tests from a test
sub-directory within clang without first building clang-func-mapping.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@314013
91177308-0d34-0410-b5e6-
96231b3b80d8
' --driver-mode=cl '))
config.substitutions.append( ('%clangxx', ' ' + config.clang +
' --driver-mode=g++ '))
-config.substitutions.append( ('%clang_func_map', ' ' + lit.util.which('clang-func-mapping', config.environment['PATH']) + ' ') )
+
+clang_func_map = lit.util.which('clang-func-mapping', config.environment['PATH'])
+if clang_func_map:
+ config.substitutions.append( ('%clang_func_map', ' ' + clang_func_map + ' ') )
+
config.substitutions.append( ('%clang', ' ' + config.clang + ' ') )
config.substitutions.append( ('%test_debuginfo',
' ' + config.llvm_src_root + '/utils/test_debuginfo.pl ') )