From 4681f6111e655057f5015564a9bf3705f87495bf Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Sat, 23 Apr 2022 14:07:31 -0700 Subject: [PATCH] [hwasan][test] Change -hwasan to -passes=hwasan With the -enable-new-pm defaulting to true, the two forms have the same effect, but the previous form uses the legacy pass manager syntax which is being phased out. --- .../Instrumentation/HWAddressSanitizer/X86/alloca-array.ll | 2 +- .../HWAddressSanitizer/X86/alloca-with-calls.ll | 2 +- llvm/test/Instrumentation/HWAddressSanitizer/X86/alloca.ll | 4 ++-- llvm/test/Instrumentation/HWAddressSanitizer/X86/atomic.ll | 2 +- llvm/test/Instrumentation/HWAddressSanitizer/X86/basic.ll | 4 ++-- llvm/test/Instrumentation/HWAddressSanitizer/X86/globals.ll | 2 +- llvm/test/Instrumentation/HWAddressSanitizer/X86/kernel.ll | 10 +++++----- llvm/test/Instrumentation/HWAddressSanitizer/X86/with-calls.ll | 4 ++-- 8 files changed, 15 insertions(+), 15 deletions(-) diff --git a/llvm/test/Instrumentation/HWAddressSanitizer/X86/alloca-array.ll b/llvm/test/Instrumentation/HWAddressSanitizer/X86/alloca-array.ll index 3bf6c84..82d675f 100644 --- a/llvm/test/Instrumentation/HWAddressSanitizer/X86/alloca-array.ll +++ b/llvm/test/Instrumentation/HWAddressSanitizer/X86/alloca-array.ll @@ -1,4 +1,4 @@ -; RUN: opt < %s -hwasan -S | FileCheck %s +; RUN: opt < %s -passes=hwasan -S | FileCheck %s target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128" target triple = "x86_64-unknown-linux-gnu" diff --git a/llvm/test/Instrumentation/HWAddressSanitizer/X86/alloca-with-calls.ll b/llvm/test/Instrumentation/HWAddressSanitizer/X86/alloca-with-calls.ll index 79e9117..4a87c2d 100644 --- a/llvm/test/Instrumentation/HWAddressSanitizer/X86/alloca-with-calls.ll +++ b/llvm/test/Instrumentation/HWAddressSanitizer/X86/alloca-with-calls.ll @@ -1,6 +1,6 @@ ; Test alloca instrumentation when tags are generated by HWASan function. ; -; RUN: opt < %s -hwasan -hwasan-generate-tags-with-calls -S | FileCheck %s +; RUN: opt < %s -passes=hwasan -hwasan-generate-tags-with-calls -S | FileCheck %s target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128" target triple = "x86_64-unknown-linux-gnu" diff --git a/llvm/test/Instrumentation/HWAddressSanitizer/X86/alloca.ll b/llvm/test/Instrumentation/HWAddressSanitizer/X86/alloca.ll index d2ac398..e3e9ab9 100644 --- a/llvm/test/Instrumentation/HWAddressSanitizer/X86/alloca.ll +++ b/llvm/test/Instrumentation/HWAddressSanitizer/X86/alloca.ll @@ -1,7 +1,7 @@ ; Test alloca instrumentation. ; -; RUN: opt < %s -hwasan -S | FileCheck %s --check-prefixes=CHECK,NO-UAR-TAGS -; RUN: opt < %s -hwasan -hwasan-uar-retag-to-zero=0 -S | FileCheck %s --check-prefixes=CHECK,UAR-TAGS +; RUN: opt < %s -passes=hwasan -S | FileCheck %s --check-prefixes=CHECK,NO-UAR-TAGS +; RUN: opt < %s -passes=hwasan -hwasan-uar-retag-to-zero=0 -S | FileCheck %s --check-prefixes=CHECK,UAR-TAGS target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128" target triple = "x86_64-unknown-linux-gnu" diff --git a/llvm/test/Instrumentation/HWAddressSanitizer/X86/atomic.ll b/llvm/test/Instrumentation/HWAddressSanitizer/X86/atomic.ll index e85fc70..e2849d2 100644 --- a/llvm/test/Instrumentation/HWAddressSanitizer/X86/atomic.ll +++ b/llvm/test/Instrumentation/HWAddressSanitizer/X86/atomic.ll @@ -1,6 +1,6 @@ ; Test basic address sanitizer instrumentation. ; -; RUN: opt < %s -hwasan -S | FileCheck %s +; RUN: opt < %s -passes=hwasan -S | FileCheck %s target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128" target triple = "x86_64-unknown-linux-gnu" diff --git a/llvm/test/Instrumentation/HWAddressSanitizer/X86/basic.ll b/llvm/test/Instrumentation/HWAddressSanitizer/X86/basic.ll index 59e73c5..9812a1b 100644 --- a/llvm/test/Instrumentation/HWAddressSanitizer/X86/basic.ll +++ b/llvm/test/Instrumentation/HWAddressSanitizer/X86/basic.ll @@ -2,8 +2,8 @@ ; Generic code is covered by ../basic.ll, only the x86_64 specific code is ; tested here. ; -; RUN: opt < %s -hwasan -hwasan-recover=0 -S | FileCheck %s --check-prefixes=CHECK,ABORT -; RUN: opt < %s -hwasan -hwasan-recover=1 -S | FileCheck %s --check-prefixes=CHECK,RECOVER +; RUN: opt < %s -passes=hwasan -hwasan-recover=0 -S | FileCheck %s --check-prefixes=CHECK,ABORT +; RUN: opt < %s -passes=hwasan -hwasan-recover=1 -S | FileCheck %s --check-prefixes=CHECK,RECOVER target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128" target triple = "x86_64-unknown-linux-gnu" diff --git a/llvm/test/Instrumentation/HWAddressSanitizer/X86/globals.ll b/llvm/test/Instrumentation/HWAddressSanitizer/X86/globals.ll index a086027..771e6e9 100644 --- a/llvm/test/Instrumentation/HWAddressSanitizer/X86/globals.ll +++ b/llvm/test/Instrumentation/HWAddressSanitizer/X86/globals.ll @@ -1,4 +1,4 @@ -; RUN: opt < %s -S -hwasan -mtriple=x86_64-unknown-linux-gnu | FileCheck %s +; RUN: opt < %s -S -passes=hwasan -mtriple=x86_64-unknown-linux-gnu | FileCheck %s ; CHECK: @__start_hwasan_globals = external hidden constant [0 x i8] ; CHECK: @__stop_hwasan_globals = external hidden constant [0 x i8] diff --git a/llvm/test/Instrumentation/HWAddressSanitizer/X86/kernel.ll b/llvm/test/Instrumentation/HWAddressSanitizer/X86/kernel.ll index 7cea081..70acd34 100644 --- a/llvm/test/Instrumentation/HWAddressSanitizer/X86/kernel.ll +++ b/llvm/test/Instrumentation/HWAddressSanitizer/X86/kernel.ll @@ -2,11 +2,11 @@ ; Generic code is covered by ../kernel.ll, only the x86_64 specific code is ; tested here. ; -; RUN: opt < %s -hwasan -hwasan-kernel=1 -S | FileCheck %s --allow-empty --check-prefixes=INIT -; RUN: opt < %s -hwasan -hwasan-kernel=1 -S | FileCheck %s -; RUN: opt < %s -hwasan -hwasan-kernel=1 -hwasan-mapping-offset=12345678 -S | FileCheck %s -; RUN: opt < %s -hwasan -hwasan-kernel=1 -hwasan-recover=0 -S | FileCheck %s --check-prefixes=CHECK,ABORT -; RUN: opt < %s -hwasan -hwasan-kernel=1 -hwasan-recover=1 -S | FileCheck %s --check-prefixes=CHECK,RECOVER +; RUN: opt < %s -passes=hwasan -hwasan-kernel=1 -S | FileCheck %s --allow-empty --check-prefixes=INIT +; RUN: opt < %s -passes=hwasan -hwasan-kernel=1 -S | FileCheck %s +; RUN: opt < %s -passes=hwasan -hwasan-kernel=1 -hwasan-mapping-offset=12345678 -S | FileCheck %s +; RUN: opt < %s -passes=hwasan -hwasan-kernel=1 -hwasan-recover=0 -S | FileCheck %s --check-prefixes=CHECK,ABORT +; RUN: opt < %s -passes=hwasan -hwasan-kernel=1 -hwasan-recover=1 -S | FileCheck %s --check-prefixes=CHECK,RECOVER target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128" target triple = "x86_64-unknown-linux-gnu" diff --git a/llvm/test/Instrumentation/HWAddressSanitizer/X86/with-calls.ll b/llvm/test/Instrumentation/HWAddressSanitizer/X86/with-calls.ll index 60d2f04..dd7135f 100644 --- a/llvm/test/Instrumentation/HWAddressSanitizer/X86/with-calls.ll +++ b/llvm/test/Instrumentation/HWAddressSanitizer/X86/with-calls.ll @@ -1,7 +1,7 @@ ; Test basic address sanitizer instrumentation. ; -; RUN: opt < %s -hwasan -hwasan-instrument-with-calls -S | FileCheck %s --check-prefixes=CHECK,ABORT -; RUN: opt < %s -hwasan -hwasan-instrument-with-calls -hwasan-recover=1 -S | FileCheck %s --check-prefixes=CHECK,RECOVER +; RUN: opt < %s -passes=hwasan -hwasan-instrument-with-calls -S | FileCheck %s --check-prefixes=CHECK,ABORT +; RUN: opt < %s -passes=hwasan -hwasan-instrument-with-calls -hwasan-recover=1 -S | FileCheck %s --check-prefixes=CHECK,RECOVER target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128" target triple = "x86_64-unknown-linux-gnu" -- 2.7.4