diff options
author | Ryotaro Kasuga <kasuga.ryotaro@fujitsu.com> | 2025-04-02 15:40:37 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-04-02 15:40:37 +0900 |
commit | c47023dceb11fcb06c2405ea11eca10ea1139aa0 (patch) | |
tree | d5ba9ef2873a1857ce784dd312c3267aa91312f7 /flang/lib/Frontend/CompilerInvocation.cpp | |
parent | 964650b69e57d5e9e6102a4b400c8da16f6a1e27 (diff) | |
download | llvm-c47023dceb11fcb06c2405ea11eca10ea1139aa0.zip llvm-c47023dceb11fcb06c2405ea11eca10ea1139aa0.tar.gz llvm-c47023dceb11fcb06c2405ea11eca10ea1139aa0.tar.bz2 |
[clang][CodeGen] Make pragma-loop test more rboust (NFC) (#133707)
pragma-loop.cpp contains tests for loop metadata generated by pragma
directives. These tests didn't work as (perhaps) expected. This is
because the regex `.*` consumes multiple elements in the metadata. For
example, there was a check directive like this.
```
// CHECK: ![[LOOP_9]] = distinct !{![[LOOP_9]], ![[WIDTH_8:.*]], ![[FIXED_VEC]], ...}
```
In the above case, `[[WIDTH_8]]` would have been expected to match a
node like `[[WIDTH_8]] = !{!"llvm.loop.vectorize.width", i32 8}`.
However, since there is no check directive to verify the contents of
`[[WIDTH_8]]`, the regex `.*` consumed more than one element. There were
other similar cases.
This patch fixes the problem by not using regex matcher in the metadata
content (except for follow-up metadata). Instead, it uses string
variables whose contents are validated elsewhere.
Related:
https://github.com/llvm/llvm-project/pull/131985#discussion_r2014369699
Diffstat (limited to 'flang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions