首页 > 解决方案 > Is there a way to break a CHECK line into multiple lines in llvm-lit?

问题描述

Imagine the following test line. Its a negative test by the way.

# CHECK: :[[@LINE+1]]:1: error: Some extremely long error messeage which goes way beyond 80 character long so would be nice to break it up
add r1, r2, r3, r4

What I want is to break it up to make it more readable like

# CHECK: :[[@LINE+1]]:1: error: Some extremely long error messeage which\
# CHECK: goes way beyond 80 character long so would be nice to break it up
add r1, r2, r3, r4

The line breaking with \ is working with # RUN command, but here it is not. Is there a way to achieve this?

标签: llvmllvm-lit

解决方案


找到了解决方案。有一个指令(sourceCHECK-SAME可以满足我的需要。我想更新问题以提及它存在,但不起作用。原来的问题是我忘记将其更改为[[@LINE+1]][[@LINE+2]]因为现在实际的汇编指令距该行 2 行。工作解决方案

# CHECK: :[[@LINE+2]]:1: error: Some extremely long error messeage which 
# CHECK-SAME: goes way beyond 80 character long so would be nice to break it up
add r1, r2, r3, r4

推荐阅读