forked from OSchip/llvm-project
[sanitizer] Remove numeric values from -asan-use-after-return flag. (NFC)
for issue: https://github.com/google/sanitizers/issues/1394 Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D104152
This commit is contained in:
parent
60084d4900
commit
1d22596b2f
|
@ -266,20 +266,11 @@ static cl::opt<AsanDetectStackUseAfterReturnMode> ClUseAfterReturn(
|
|||
cl::values(
|
||||
clEnumValN(AsanDetectStackUseAfterReturnMode::Never, "never",
|
||||
"Never detect stack use after return."),
|
||||
clEnumValN(AsanDetectStackUseAfterReturnMode::Never,
|
||||
"0", // only needed to keep unit tests passing
|
||||
"Redundant with 'never'."),
|
||||
clEnumValN(
|
||||
AsanDetectStackUseAfterReturnMode::Runtime, "runtime",
|
||||
"Detect stack use after return if "
|
||||
"binary flag 'ASAN_OPTIONS=detect_stack_use_after_return' is set."),
|
||||
clEnumValN(AsanDetectStackUseAfterReturnMode::Runtime,
|
||||
"1", // only needed to keep unit tests passing
|
||||
"redundant with 'runtime'."),
|
||||
clEnumValN(AsanDetectStackUseAfterReturnMode::Always, "always",
|
||||
"Always detect stack use after return."),
|
||||
clEnumValN(AsanDetectStackUseAfterReturnMode::Always,
|
||||
"2", // only needed to keep unit tests passing
|
||||
"Always detect stack use after return.")),
|
||||
cl::Hidden, cl::init(AsanDetectStackUseAfterReturnMode::Runtime));
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
; RUN: opt < %s -asan -asan-module -asan-use-after-return=0 -S -enable-new-pm=0 | \
|
||||
; RUN: opt < %s -asan -asan-module -asan-use-after-return=never -S -enable-new-pm=0 | \
|
||||
; RUN: llc -O0 -filetype=obj - -o - | \
|
||||
; RUN: llvm-dwarfdump - | FileCheck %s
|
||||
; RUN: opt < %s -passes=asan-pipeline -asan-use-after-return=0 -S | \
|
||||
; RUN: opt < %s -passes=asan-pipeline -asan-use-after-return=never -S | \
|
||||
; RUN: llc -O0 -filetype=obj - -o - | \
|
||||
; RUN: llvm-dwarfdump - | FileCheck %s
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
; RUN: opt < %s -asan -asan-module -enable-new-pm=0 -asan-use-after-return=0 -S | FileCheck %s
|
||||
; RUN: opt < %s -passes='asan-pipeline' -asan-use-after-return=0 -S | FileCheck %s
|
||||
; RUN: opt < %s -asan -asan-module -enable-new-pm=0 -asan-use-after-return=never -S | FileCheck %s
|
||||
; RUN: opt < %s -passes='asan-pipeline' -asan-use-after-return=never -S | FileCheck %s
|
||||
|
||||
; Checks that llvm.dbg.declare instructions are updated
|
||||
; accordingly as we merge allocas.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
|
||||
; RUN: opt < %s -passes='asan-pipeline' -asan-use-after-return=0 -S | FileCheck %s --check-prefixes=CHECK,NEVER
|
||||
; RUN: opt < %s -passes='asan-pipeline' -asan-use-after-return=1 -S | FileCheck %s --check-prefixes=CHECK,RUNTIME
|
||||
; RUN: opt < %s -passes='asan-pipeline' -asan-use-after-return=2 -S | FileCheck %s --check-prefixes=CHECK,ALWAYS
|
||||
; RUN: opt < %s -passes='asan-pipeline' -asan-use-after-return=never -S | FileCheck %s --check-prefixes=CHECK,NEVER
|
||||
; RUN: opt < %s -passes='asan-pipeline' -asan-use-after-return=runtime -S | FileCheck %s --check-prefixes=CHECK,RUNTIME
|
||||
; RUN: opt < %s -passes='asan-pipeline' -asan-use-after-return=always -S | FileCheck %s --check-prefixes=CHECK,ALWAYS
|
||||
target datalayout = "e-i64:64-f80:128-s:64-n8:16:32:64-S128"
|
||||
target triple = "x86_64-unknown-linux-gnu"
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
; Test handling of llvm.lifetime intrinsics with C++ exceptions.
|
||||
; RUN: opt < %s -asan -asan-module -enable-new-pm=0 -asan-use-after-scope -asan-use-after-return=0 -S | FileCheck %s
|
||||
; RUN: opt < %s -passes='asan-pipeline' -asan-use-after-scope -asan-use-after-return=0 -S | FileCheck %s
|
||||
; RUN: opt < %s -asan -asan-module -enable-new-pm=0 -asan-use-after-scope -asan-use-after-return=never -S | FileCheck %s
|
||||
; RUN: opt < %s -passes='asan-pipeline' -asan-use-after-scope -asan-use-after-return=never -S | FileCheck %s
|
||||
|
||||
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
|
||||
target triple = "x86_64-unknown-linux-gnu"
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
; Test handling of llvm.lifetime intrinsics.
|
||||
; RUN: opt < %s -asan -asan-module -enable-new-pm=0 -asan-use-after-scope -asan-use-after-return=0 -S | FileCheck %s --check-prefixes=CHECK,CHECK-DEFAULT
|
||||
; RUN: opt < %s -passes='asan-pipeline' -asan-use-after-scope -asan-use-after-return=0 -S | FileCheck %s --check-prefixes=CHECK,CHECK-DEFAULT
|
||||
; RUN: opt < %s -asan -asan-module -enable-new-pm=0 -asan-use-after-scope -asan-use-after-return=0 -asan-instrument-dynamic-allocas=0 -S | FileCheck %s --check-prefixes=CHECK,CHECK-NO-DYNAMIC
|
||||
; RUN: opt < %s -passes='asan-pipeline' -asan-use-after-scope -asan-use-after-return=0 -asan-instrument-dynamic-allocas=0 -S | FileCheck %s --check-prefixes=CHECK,CHECK-NO-DYNAMIC
|
||||
; RUN: opt < %s -asan -asan-module -enable-new-pm=0 -asan-use-after-scope -asan-use-after-return=never -S | FileCheck %s --check-prefixes=CHECK,CHECK-DEFAULT
|
||||
; RUN: opt < %s -passes='asan-pipeline' -asan-use-after-scope -asan-use-after-return=never -S | FileCheck %s --check-prefixes=CHECK,CHECK-DEFAULT
|
||||
; RUN: opt < %s -asan -asan-module -enable-new-pm=0 -asan-use-after-scope -asan-use-after-return=never -asan-instrument-dynamic-allocas=0 -S | FileCheck %s --check-prefixes=CHECK,CHECK-NO-DYNAMIC
|
||||
; RUN: opt < %s -passes='asan-pipeline' -asan-use-after-scope -asan-use-after-return=never -asan-instrument-dynamic-allocas=0 -S | FileCheck %s --check-prefixes=CHECK,CHECK-NO-DYNAMIC
|
||||
|
||||
target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128"
|
||||
target triple = "x86_64-unknown-linux-gnu"
|
||||
|
|
Loading…
Reference in New Issue