[compiler-rt] 95acd92 - [memprof][NFC] Fix mismatched-new-delete in memprof tests
Vitaly Buka via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 20 18:43:32 PST 2021
Author: Xu Mingjie
Date: 2021-12-20T18:43:21-08:00
New Revision: 95acd9241c497228a528dbcb9045db73227c855c
URL: https://github.com/llvm/llvm-project/commit/95acd9241c497228a528dbcb9045db73227c855c
DIFF: https://github.com/llvm/llvm-project/commit/95acd9241c497228a528dbcb9045db73227c855c.diff
LOG: [memprof][NFC] Fix mismatched-new-delete in memprof tests
Fix mismatched-new-delete in memprof test_new_load_store.cpp and test_terse.cpp
Reviewed By: snehasish
Differential Revision: https://reviews.llvm.org/D116024
Added:
Modified:
compiler-rt/test/memprof/TestCases/test_new_load_store.cpp
compiler-rt/test/memprof/TestCases/test_terse.cpp
Removed:
################################################################################
diff --git a/compiler-rt/test/memprof/TestCases/test_new_load_store.cpp b/compiler-rt/test/memprof/TestCases/test_new_load_store.cpp
index 9c080b76b88fa..8b7caed1d443b 100644
--- a/compiler-rt/test/memprof/TestCases/test_new_load_store.cpp
+++ b/compiler-rt/test/memprof/TestCases/test_new_load_store.cpp
@@ -35,7 +35,7 @@ int main() {
for (int i = 0; i < 10; i++)
j += p[i];
#ifdef FREE
- delete p;
+ delete[] p;
#endif
return 0;
diff --git a/compiler-rt/test/memprof/TestCases/test_terse.cpp b/compiler-rt/test/memprof/TestCases/test_terse.cpp
index b121e993b7cbe..bb48d9d6c259b 100644
--- a/compiler-rt/test/memprof/TestCases/test_terse.cpp
+++ b/compiler-rt/test/memprof/TestCases/test_terse.cpp
@@ -24,7 +24,7 @@ int main() {
for (int i = 0; i < 10; i++)
j += p[i];
#ifdef FREE
- delete p;
+ delete[] p;
#endif
return 0;
More information about the llvm-commits
mailing list