Skip to content

Commit

Permalink
Add CHECK-LABEL to avoid source tree path sensitivity in test
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
tex3d committed Oct 16, 2024
1 parent cc13d4f commit 9afd080
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions clang/test/CodeGen/2004-02-20-Builtins.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

0 comments on commit 9afd080

Please sign in to comment.