[compiler-rt] r206182 - [asan] Fix mmap_limit_mb test to not use C++11.

Evgeniy Stepanov eugeni.stepanov at gmail.com
Mon Apr 14 08:37:02 PDT 2014


Author: eugenis
Date: Mon Apr 14 10:37:02 2014
New Revision: 206182

URL: http://llvm.org/viewvc/llvm-project?rev=206182&view=rev
Log:
[asan] Fix mmap_limit_mb test to not use C++11.

Modified:
    compiler-rt/trunk/test/asan/TestCases/mmap_limit_mb.cc

Modified: compiler-rt/trunk/test/asan/TestCases/mmap_limit_mb.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/mmap_limit_mb.cc?rev=206182&r1=206181&r2=206182&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/mmap_limit_mb.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/mmap_limit_mb.cc Mon Apr 14 10:37:02 2014
@@ -1,6 +1,6 @@
 // Test the mmap_limit_mb flag.
 //
-// RUN: %clangxx_asan -std=c++11 -O2 %s -o %t
+// RUN: %clangxx_asan -O2 %s -o %t
 // RUN: %t 100 16
 // RUN: %t 100 1000000
 // RUN: ASAN_OPTIONS=mmap_limit_mb=500 %t 100 16
@@ -22,7 +22,8 @@ int main(int argc, char **argv) {
   std::vector<char *> v;
   for (long total = total_mb << 20; total > 0; total -= allocation_size)
     v.push_back(new char[allocation_size]);
-  for (auto p : v) delete[] p;
+  for (std::vector<char *>::const_iterator it = v.begin(); it != v.end(); ++it)
+    delete[](*it);
   printf("PASS\n");
   // CHECK: AddressSanitizer CHECK failed{{.*}}total_mmaped{{.*}}mmap_limit_mb
   return 0;





More information about the llvm-commits mailing list