15 lines · c
1// Test that HWASan and KHWASan runs with the new pass manager.2// We run them under different optimizations to ensure the IR is still3// being instrumented properly.4 5// RUN: %clang_cc1 -triple x86_64-linux-gnu -emit-llvm -o - -fsanitize=hwaddress %s | FileCheck %s6// RUN: %clang_cc1 -triple x86_64-linux-gnu -emit-llvm -o - -O1 -fsanitize=hwaddress %s | FileCheck %s7 8// RUN: %clang_cc1 -triple x86_64-linux-gnu -emit-llvm -o - -fsanitize=kernel-hwaddress %s | FileCheck %s9// RUN: %clang_cc1 -triple x86_64-linux-gnu -emit-llvm -o - -O1 -fsanitize=kernel-hwaddress %s | FileCheck %s10 11int foo(int *a) { return *a; }12 13// All the cases above mark the function with sanitize_hwaddress.14// CHECK: sanitize_hwaddress15