diff options
| author | Michael Kruse <llvm-project@meinersbur.de> | 2025-01-03 10:22:51 +0100 |
|---|---|---|
| committer | Michael Kruse <llvm-project@meinersbur.de> | 2025-01-03 10:22:51 +0100 |
| commit | 38500d63e14ce340236840f60d356cdefb56a52c (patch) | |
| tree | 17edbec446ce9b50d2f215a483b83afb293a635d /compiler-rt/test/memprof/TestCases/dump_at_exit.cpp | |
| parent | 1a3d5daaef7a6a63448a497da3eff7fc9e23df26 (diff) | |
| parent | 27f30029741ecf023baece7b3dde1ff9011ffefc (diff) | |
Merge branch 'main' into users/meinersbur/flang_runtime_split-headersusers/meinersbur/flang_runtime_split-headers
Diffstat (limited to 'compiler-rt/test/memprof/TestCases/dump_at_exit.cpp')
| -rw-r--r-- | compiler-rt/test/memprof/TestCases/dump_at_exit.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/compiler-rt/test/memprof/TestCases/dump_at_exit.cpp b/compiler-rt/test/memprof/TestCases/dump_at_exit.cpp new file mode 100644 index 000000000000..426849d1cea0 --- /dev/null +++ b/compiler-rt/test/memprof/TestCases/dump_at_exit.cpp @@ -0,0 +1,16 @@ +// RUN: %clangxx_memprof %s -o %t + +// RUN: %env_memprof_opts=print_text=true:log_path=stdout:dump_at_exit=false %run %t | count 0 +// RUN: %env_memprof_opts=print_text=true:log_path=stdout:dump_at_exit=true %run %t | FileCheck %s + +#include <stdlib.h> +#include <string.h> + +int main() { + char *x = (char *)malloc(10); + memset(x, 0, 10); + free(x); + return 0; +} + +// CHECK: Recorded MIBs |
