[llvm] 1d22596 - [sanitizer] Remove numeric values from -asan-use-after-return flag. (NFC)
Kevin Athey via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 11 15:14:56 PDT 2021
Author: Kevin Athey
Date: 2021-06-11T15:14:51-07:00
New Revision: 1d22596b2f6aef587af785744d8951668559113e
URL: https://github.com/llvm/llvm-project/commit/1d22596b2f6aef587af785744d8951668559113e
DIFF: https://github.com/llvm/llvm-project/commit/1d22596b2f6aef587af785744d8951668559113e.diff
LOG: [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
Added:
Modified:
llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp
llvm/test/DebugInfo/X86/asan_debug_info.ll
llvm/test/Instrumentation/AddressSanitizer/debug_info.ll
llvm/test/Instrumentation/AddressSanitizer/fake-stack.ll
llvm/test/Instrumentation/AddressSanitizer/lifetime-throw.ll
llvm/test/Instrumentation/AddressSanitizer/lifetime.ll
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp b/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp
index dd26d3462eb79..1601c5d28fdd9 100644
--- a/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp
+++ b/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp
@@ -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));
diff --git a/llvm/test/DebugInfo/X86/asan_debug_info.ll b/llvm/test/DebugInfo/X86/asan_debug_info.ll
index 3f2ecc2faa432..25e403e8c91b9 100644
--- a/llvm/test/DebugInfo/X86/asan_debug_info.ll
+++ b/llvm/test/DebugInfo/X86/asan_debug_info.ll
@@ -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
diff --git a/llvm/test/Instrumentation/AddressSanitizer/debug_info.ll b/llvm/test/Instrumentation/AddressSanitizer/debug_info.ll
index 1064ce5fc4bae..7b21c7b54baed 100644
--- a/llvm/test/Instrumentation/AddressSanitizer/debug_info.ll
+++ b/llvm/test/Instrumentation/AddressSanitizer/debug_info.ll
@@ -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.
diff --git a/llvm/test/Instrumentation/AddressSanitizer/fake-stack.ll b/llvm/test/Instrumentation/AddressSanitizer/fake-stack.ll
index 682b6676fb8ba..b64d67bdc4bc9 100644
--- a/llvm/test/Instrumentation/AddressSanitizer/fake-stack.ll
+++ b/llvm/test/Instrumentation/AddressSanitizer/fake-stack.ll
@@ -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"
diff --git a/llvm/test/Instrumentation/AddressSanitizer/lifetime-throw.ll b/llvm/test/Instrumentation/AddressSanitizer/lifetime-throw.ll
index 64473fb59f76e..62253be243643 100644
--- a/llvm/test/Instrumentation/AddressSanitizer/lifetime-throw.ll
+++ b/llvm/test/Instrumentation/AddressSanitizer/lifetime-throw.ll
@@ -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"
diff --git a/llvm/test/Instrumentation/AddressSanitizer/lifetime.ll b/llvm/test/Instrumentation/AddressSanitizer/lifetime.ll
index 26aa65715d262..d7ef711d01b87 100644
--- a/llvm/test/Instrumentation/AddressSanitizer/lifetime.ll
+++ b/llvm/test/Instrumentation/AddressSanitizer/lifetime.ll
@@ -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"
More information about the llvm-commits
mailing list