[clang] [DebugInfo] Make a test more robust (PR #106463)
via cfe-commits
cfe-commits at lists.llvm.org
Wed Aug 28 15:42:33 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-debuginfo
Author: Paul T Robinson (pogo59)
<details>
<summary>Changes</summary>
This was accidentally matching a metadata record that happend to have three elements, but wasn't the record of interest. Add CHECKs to make sure we've found the correct record.
---
Full diff: https://github.com/llvm/llvm-project/pull/106463.diff
1 Files Affected:
- (modified) clang/test/CodeGenCXX/debug-info-lambda-this.cpp (+2-1)
``````````diff
diff --git a/clang/test/CodeGenCXX/debug-info-lambda-this.cpp b/clang/test/CodeGenCXX/debug-info-lambda-this.cpp
index 0a2f08ea4aa6d8..e5acab126d72ca 100644
--- a/clang/test/CodeGenCXX/debug-info-lambda-this.cpp
+++ b/clang/test/CodeGenCXX/debug-info-lambda-this.cpp
@@ -21,7 +21,8 @@ int main() {
return 0;
}
-// CHECK: !{![[FOO_THIS:[0-9]+]], ![[FOO_AA:[0-9]+]], ![[FOO_OPERATOR:[0-9]+]]}
+// CHECK: distinct !DICompositeType(tag: DW_TAG_class_type, name: "<lambda_1>", {{.*}}, elements: ![[ELEMENT_TAG:[0-9]+]]
+// CHECK: ![[ELEMENT_TAG]] = !{![[FOO_THIS:[0-9]+]], ![[FOO_AA:[0-9]+]], ![[FOO_OPERATOR:[0-9]+]]}
// CHECK-NEXT: ![[FOO_THIS]] = !DIDerivedType(tag: DW_TAG_member, name: "__this", scope: ![[#]], file: ![[#]], line: [[#]], baseType: ![[#]], size: [[#]])
// CHECK-NEXT: ![[FOO_AA]] = !DIDerivedType(tag: DW_TAG_member, name: "aa", scope: ![[#]], file: ![[#]], line: [[#]], baseType: ![[#]], size: [[#]], offset: [[#]])
// CHECK-NEXT: ![[FOO_OPERATOR]] = !DISubprogram(name: "operator()", scope: ![[#]], file: ![[#]], line: [[#]], type: ![[#]], scopeLine: [[#]], flags: DIFlagPublic | DIFlagPrototyped, spFlags: 0)
``````````
</details>
https://github.com/llvm/llvm-project/pull/106463
More information about the cfe-commits
mailing list