Skip to content

Commit 60adcfd

Browse files
update_test_checks: recognize %if in RUN line
1 parent 83220e9 commit 60adcfd

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

llvm/utils/update_test_checks.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,13 @@ def main():
123123
common.warn("Skipping unparsable RUN line: " + l)
124124
continue
125125

126-
commands = [cmd.strip() for cmd in l.split("|")]
126+
cropped_content = l
127+
if "%if" in l:
128+
match = re.search(r'%{\s*(.*?)\s*%}', l)
129+
if match:
130+
cropped_content = match.group(1)
131+
132+
commands = [cmd.strip() for cmd in cropped_content.split("|")]
127133
assert len(commands) >= 2
128134
preprocess_cmd = None
129135
if len(commands) > 2:

0 commit comments

Comments
 (0)