diff options
author | Mitch Phillips <31459023+hctim@users.noreply.github.com> | 2022-06-24 14:49:37 -0700 |
---|---|---|
committer | Mitch Phillips <31459023+hctim@users.noreply.github.com> | 2022-06-24 14:49:37 -0700 |
commit | 243fc3daf675ea047bb80c21c62d24a331da8b16 (patch) | |
tree | 394d1ceb13ef26cf1b316756b433d76a8009b6f7 | |
parent | fadc98b06befb674fa47da4f3d8606bf61bed681 (diff) | |
download | llvm-243fc3daf675ea047bb80c21c62d24a331da8b16.zip llvm-243fc3daf675ea047bb80c21c62d24a331da8b16.tar.gz llvm-243fc3daf675ea047bb80c21c62d24a331da8b16.tar.bz2 |
fix-forward hwasan-globals.cpp (round 2)
Just force the aarch64 target compilation (after making sure the test
only runs if that target is available).
Because global metadata isn't target-specific, just selecting a target
here is fine.
Should fix https://reviews.llvm.org/D127544#3609312
-rw-r--r-- | clang/test/CodeGen/hwasan-globals.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/clang/test/CodeGen/hwasan-globals.cpp b/clang/test/CodeGen/hwasan-globals.cpp index 9424efa..39460d3 100644 --- a/clang/test/CodeGen/hwasan-globals.cpp +++ b/clang/test/CodeGen/hwasan-globals.cpp @@ -1,13 +1,14 @@ -// REQUIRES: aarch64-registered-target || x86-registered-target +// REQUIRES: aarch64-registered-target // RUN: %clang_cc1 -include %S/Inputs/sanitizer-extra-source.cpp \ // RUN: -fsanitize-ignorelist=%S/Inputs/sanitizer-ignorelist-global.txt \ -// RUN: -fsanitize=hwaddress -emit-llvm -o - %s | FileCheck %s +// RUN: -fsanitize=hwaddress -emit-llvm -triple aarch64-linux-android31 -o -\ +// RUN: %s | FileCheck %s // RUN: %clang_cc1 -include %S/Inputs/sanitizer-extra-source.cpp \ // RUN: -fsanitize-ignorelist=%S/Inputs/sanitizer-ignorelist-src.txt \ -// RUN: -fsanitize=hwaddress -emit-llvm -o - %s | \ -// RUN: FileCheck %s --check-prefix=IGNORELIST +// RUN: -fsanitize=hwaddress -emit-llvm -triple aarch64-linux-android31 -o -\ +// RUN: %s | FileCheck %s --check-prefix=IGNORELIST int global; int __attribute__((no_sanitize("hwaddress"))) attributed_global; @@ -31,14 +32,14 @@ void func() { // CHECK: ![[EXTRA_GLOBAL]] = !{{{.*}} ![[EXTRA_GLOBAL_LOC:[0-9]+]], !"extra_global", i1 false, i1 false} // CHECK: ![[EXTRA_GLOBAL_LOC]] = !{!"{{.*}}extra-source.cpp", i32 1, i32 5} // CHECK: ![[GLOBAL]] = !{{{.*}} ![[GLOBAL_LOC:[0-9]+]], !"global", i1 false, i1 false} -// CHECK: ![[GLOBAL_LOC]] = !{!"{{.*}}hwasan-globals.cpp", i32 12, i32 5} +// CHECK: ![[GLOBAL_LOC]] = !{!"{{.*}}hwasan-globals.cpp", i32 13, i32 5} // CHECK: ![[ATTR_GLOBAL]] = !{{{.*attributed_global.*}}, null, null, i1 false, i1 true} // CHECK: ![[DISABLE_INSTR_GLOBAL]] = !{{{.*disable_instrumentation_global.*}}, null, null, i1 false, i1 true} // CHECK: ![[IGNORELISTED_GLOBAL]] = !{{{.*ignorelisted_global.*}}, null, null, i1 false, i1 true} // CHECK: ![[STATIC_VAR]] = !{{{.*}} ![[STATIC_LOC:[0-9]+]], !"static_var", i1 false, i1 false} -// CHECK: ![[STATIC_LOC]] = !{!"{{.*}}hwasan-globals.cpp", i32 18, i32 14} +// CHECK: ![[STATIC_LOC]] = !{!"{{.*}}hwasan-globals.cpp", i32 19, i32 14} // CHECK: ![[LITERAL]] = !{{{.*}} ![[LITERAL_LOC:[0-9]+]], !"<string literal>", i1 false, i1 false} -// CHECK: ![[LITERAL_LOC]] = !{!"{{.*}}hwasan-globals.cpp", i32 19, i32 25} +// CHECK: ![[LITERAL_LOC]] = !{!"{{.*}}hwasan-globals.cpp", i32 20, i32 25} // IGNORELIST: @{{.*}}global{{.*}} ={{.*}} global {{.*}}, no_sanitize_hwaddress // IGNORELIST: @{{.*}}attributed_global{{.*}} ={{.*}} global {{.*}}, no_sanitize_hwaddress |