llvm-project/clang/test/CodeGen/hwasan-new-pm.c
Fangrui Song c5de4dd1ea [test] %clang_cc1 -emit-llvm: remove redundant -S
And replace -emit-llvm -o - with -emit-llvm-only
2024-05-04 17:00:29 -07:00

15 lines
715 B
C

// Test that HWASan and KHWASan runs with the new pass manager.
// We run them under different optimizations to ensure the IR is still
// being instrumented properly.
// RUN: %clang_cc1 -triple x86_64-linux-gnu -emit-llvm -o - -fsanitize=hwaddress %s | FileCheck %s
// RUN: %clang_cc1 -triple x86_64-linux-gnu -emit-llvm -o - -O1 -fsanitize=hwaddress %s | FileCheck %s
// RUN: %clang_cc1 -triple x86_64-linux-gnu -emit-llvm -o - -fsanitize=kernel-hwaddress %s | FileCheck %s
// RUN: %clang_cc1 -triple x86_64-linux-gnu -emit-llvm -o - -O1 -fsanitize=kernel-hwaddress %s | FileCheck %s
int foo(int *a) { return *a; }
// All the cases above mark the function with sanitize_hwaddress.
// CHECK: sanitize_hwaddress