Try to guard a test that requires DEBUG().

This is a follow-up patch for r185524. Being assert enabled does not mean
that DEBUG() is enabled, so we need to check the existence of DEBUG() itself.

llvm-svn: 185619
This commit is contained in:
Rui Ueyama 2013-07-04 09:29:47 +00:00
parent 6a7d68349f
commit 130a6eb7fa
2 changed files with 3 additions and 1 deletions

View File

@ -1,4 +1,4 @@
# REQUIRES: asserts
# REQUIRES: debug
# RUN: lld -core --add-pass layout -mllvm -debug-only=LayoutPass %s 2>&1 \
# RUN: | FileCheck %s -check-prefix=CHECK

View File

@ -126,6 +126,8 @@ except OSError, why:
print "Could not find llc in " + llvm_tools_dir
exit(42)
if re.search(r'DEBUG', llc_cmd.stdout.read()):
config.available_features.add('debug')
if re.search(r'with assertions', llc_cmd.stdout.read()):
config.available_features.add('asserts')
llc_cmd.wait()