[clang] Add CHECK-LABEL to avoid source tree path sensitivity in test (PR #112461)
Tex Riddell via cfe-commits
cfe-commits at lists.llvm.org
Tue Oct 15 19:20:45 PDT 2024
https://github.com/tex3d created https://github.com/llvm/llvm-project/pull/112461
The test `clang/test/CodeGen/2004-02-20-Builtins.c` will erroneously fail if "builtin" is in the path to your source tree.
This change adds a `CHECK-LABEL !llvm.ident` after the `CHECK-NOT` to avoid searching into the metadata containing the path.
>From 9afd08021d7aef280d1ddb70a89bab3c026a2679 Mon Sep 17 00:00:00 2001
From: Tex Riddell <texr at microsoft.com>
Date: Tue, 15 Oct 2024 13:50:00 -0700
Subject: [PATCH] Add CHECK-LABEL to avoid source tree path sensitivity in test
The test `clang/test/CodeGen/2004-02-20-Builtins.c` will erroneously fail if "builtin" is in the path to your source tree.
This change adds a `CHECK-LABEL !llvm.ident` after the `CHECK-NOT` to avoid searching into the metadata containing the path.
---
clang/test/CodeGen/2004-02-20-Builtins.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/clang/test/CodeGen/2004-02-20-Builtins.c b/clang/test/CodeGen/2004-02-20-Builtins.c
index 13f970127d606a..4febe2fd30e1dd 100644
--- a/clang/test/CodeGen/2004-02-20-Builtins.c
+++ b/clang/test/CodeGen/2004-02-20-Builtins.c
@@ -3,6 +3,9 @@ double sqrt(double x);
// CHECK-LABEL: @zsqrtxxx
// CHECK-NOT: builtin
+// Don't search into metadata definitions. !llvm.ident can contain the
+// substring "builtin" if it's in the source tree path.
+// CHECK-LABEL: !llvm.ident
void zsqrtxxx(float num) {
num = sqrt(num);
}
More information about the cfe-commits
mailing list