[compiler-rt] 882ce17 - [NFC][sanitizer] Remove %stdcxx11

Vitaly Buka via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 14 16:48:06 PDT 2021


Author: Vitaly Buka
Date: 2021-10-14T16:47:43-07:00
New Revision: 882ce178b317c565f14b0de05a2c9ee39fe78a83

URL: https://github.com/llvm/llvm-project/commit/882ce178b317c565f14b0de05a2c9ee39fe78a83
DIFF: https://github.com/llvm/llvm-project/commit/882ce178b317c565f14b0de05a2c9ee39fe78a83.diff

LOG: [NFC][sanitizer] Remove %stdcxx11

-std=c++14 is a default for a while.

Reviewed By: kstoimenov

Differential Revision: https://reviews.llvm.org/D111848

Added: 
    

Modified: 
    compiler-rt/test/asan/TestCases/exitcode.cpp
    compiler-rt/test/asan/TestCases/use-after-scope-capture.cpp
    compiler-rt/test/asan/TestCases/use-after-scope-temp.cpp
    compiler-rt/test/asan/TestCases/use-after-scope-temp2.cpp
    compiler-rt/test/asan/TestCases/use-after-scope-types.cpp
    compiler-rt/test/asan/lit.cfg.py
    compiler-rt/test/memprof/lit.cfg.py

Removed: 
    


################################################################################
diff  --git a/compiler-rt/test/asan/TestCases/exitcode.cpp b/compiler-rt/test/asan/TestCases/exitcode.cpp
index cb10540999b7d..e949436e1909c 100644
--- a/compiler-rt/test/asan/TestCases/exitcode.cpp
+++ b/compiler-rt/test/asan/TestCases/exitcode.cpp
@@ -1,4 +1,4 @@
-// RUN: %clangxx_asan -g %stdcxx11 -Wno-deprecated-declarations %s -o %t
+// RUN: %clangxx_asan -g -Wno-deprecated-declarations %s -o %t
 // RUN: %env_asan_opts=exitcode=42 %run %t | FileCheck %s
 
 // Android doesn't have spawn.h or posix_spawn.

diff  --git a/compiler-rt/test/asan/TestCases/use-after-scope-capture.cpp b/compiler-rt/test/asan/TestCases/use-after-scope-capture.cpp
index 319d20519e7ca..19444b80d935c 100644
--- a/compiler-rt/test/asan/TestCases/use-after-scope-capture.cpp
+++ b/compiler-rt/test/asan/TestCases/use-after-scope-capture.cpp
@@ -1,4 +1,4 @@
-// RUN: %clangxx_asan %stdcxx11 -O1 -fsanitize-address-use-after-scope %s -o %t && \
+// RUN: %clangxx_asan -O1 -fsanitize-address-use-after-scope %s -o %t && \
 // RUN:     not %run %t 2>&1 | FileCheck %s
 
 #include <functional>

diff  --git a/compiler-rt/test/asan/TestCases/use-after-scope-temp.cpp b/compiler-rt/test/asan/TestCases/use-after-scope-temp.cpp
index 2cfc7cee215a9..2a2981caf9389 100644
--- a/compiler-rt/test/asan/TestCases/use-after-scope-temp.cpp
+++ b/compiler-rt/test/asan/TestCases/use-after-scope-temp.cpp
@@ -1,6 +1,4 @@
-// RUN: %clangxx_asan %stdcxx11 -O1 -fsanitize-address-use-after-scope %s -o %t && \
-// RUN:     not %run %t 2>&1 | FileCheck %s
-
+// RUN: %clangxx_asan -O1 -fsanitize-address-use-after-scope %s -o %t && not %run %t 2>&1 | FileCheck %s
 
 struct IntHolder {
   int val;

diff  --git a/compiler-rt/test/asan/TestCases/use-after-scope-temp2.cpp b/compiler-rt/test/asan/TestCases/use-after-scope-temp2.cpp
index 3e6f52a3942ee..48688ebbcca7f 100644
--- a/compiler-rt/test/asan/TestCases/use-after-scope-temp2.cpp
+++ b/compiler-rt/test/asan/TestCases/use-after-scope-temp2.cpp
@@ -1,7 +1,6 @@
-// RUN: %clangxx_asan %stdcxx11 -O1 -fsanitize-address-use-after-scope %s -o %t && \
+// RUN: %clangxx_asan -O1 -fsanitize-address-use-after-scope %s -o %t && \
 // RUN:     not %run %t 2>&1 | FileCheck %s
 
-
 struct IntHolder {
   __attribute__((noinline)) const IntHolder &Self() const {
     return *this;

diff  --git a/compiler-rt/test/asan/TestCases/use-after-scope-types.cpp b/compiler-rt/test/asan/TestCases/use-after-scope-types.cpp
index 5afd3b1ef4e00..dd077e9a35110 100644
--- a/compiler-rt/test/asan/TestCases/use-after-scope-types.cpp
+++ b/compiler-rt/test/asan/TestCases/use-after-scope-types.cpp
@@ -1,4 +1,4 @@
-// RUN: %clangxx_asan %stdcxx11 -O0 -fsanitize-address-use-after-scope %s -o %t
+// RUN: %clangxx_asan -O0 -fsanitize-address-use-after-scope %s -o %t
 // RUN: not %run %t 0 2>&1 | FileCheck %s
 // RUN: not %run %t 1 2>&1 | FileCheck %s
 // RUN: not %run %t 2 2>&1 | FileCheck %s

diff  --git a/compiler-rt/test/asan/lit.cfg.py b/compiler-rt/test/asan/lit.cfg.py
index cfd2407909e70..497c5e5f07069 100644
--- a/compiler-rt/test/asan/lit.cfg.py
+++ b/compiler-rt/test/asan/lit.cfg.py
@@ -167,14 +167,6 @@ def build_invocation(compile_flags):
   config.substitutions.append( ("%asan_cxx_lib", base_lib % "_cxx") )
   config.substitutions.append( ("%asan_dll_thunk", base_lib % "_dll_thunk") )
 
-if platform.system() == 'Windows':
-  # Don't use -std=c++11 on Windows, as the driver will detect the appropriate
-  # default needed to use with the STL.
-  config.substitutions.append(("%stdcxx11 ", ""))
-else:
-  # Some tests uses C++11 features such as lambdas and need to pass -std=c++11.
-  config.substitutions.append(("%stdcxx11 ", "-std=c++11 "))
-
 # FIXME: De-hardcode this path.
 asan_source_dir = os.path.join(
   get_required_attr(config, "compiler_rt_src_root"), "lib", "asan")

diff  --git a/compiler-rt/test/memprof/lit.cfg.py b/compiler-rt/test/memprof/lit.cfg.py
index 79024b64d46a4..a247d42d792b0 100644
--- a/compiler-rt/test/memprof/lit.cfg.py
+++ b/compiler-rt/test/memprof/lit.cfg.py
@@ -74,9 +74,6 @@ def build_invocation(compile_flags):
   config.substitutions.append( ("%clang_memprof_static ", build_invocation(clang_memprof_static_cflags)) )
   config.substitutions.append( ("%clangxx_memprof_static ", build_invocation(clang_memprof_static_cxxflags)) )
 
-# Some tests uses C++11 features such as lambdas and need to pass -std=c++11.
-config.substitutions.append(("%stdcxx11 ", '-std=c++11 '))
-
 config.substitutions.append( ("%libdl", libdl_flag) )
 
 config.available_features.add('memprof-' + config.bits + '-bits')


        


More information about the llvm-commits mailing list