summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEvgeniy Stepanov <eugeni.stepanov@gmail.com>2014-04-14 15:37:02 +0000
committerEvgeniy Stepanov <eugeni.stepanov@gmail.com>2014-04-14 15:37:02 +0000
commit81d80f7578d792da1276fed2a646c33f1829e91c (patch)
tree4c9f2ca5b327238d2c7f97e9f6bc31e8f7273ffb
parent681016b2ea07902831f22ce91d136c7110addc0a (diff)
downloadbcm5719-llvm-81d80f7578d792da1276fed2a646c33f1829e91c.tar.gz
bcm5719-llvm-81d80f7578d792da1276fed2a646c33f1829e91c.zip
[asan] Fix mmap_limit_mb test to not use C++11.
llvm-svn: 206182
-rw-r--r--compiler-rt/test/asan/TestCases/mmap_limit_mb.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/compiler-rt/test/asan/TestCases/mmap_limit_mb.cc b/compiler-rt/test/asan/TestCases/mmap_limit_mb.cc
index 92c114127e0..f3aafe9ec49 100644
--- a/compiler-rt/test/asan/TestCases/mmap_limit_mb.cc
+++ b/compiler-rt/test/asan/TestCases/mmap_limit_mb.cc
@@ -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;
OpenPOWER on IntegriCloud