brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.0 KiB · ddf2f85 Raw
27 lines · cpp
1// RUN: %clangxx --target=x86_64-linux-gnu -fmemory-profile %s -### 2>&1 | FileCheck %s2// RUN: %clangxx --target=x86_64-linux-gnu -fmemory-profile=foo %s -### 2>&1 | FileCheck %s --check-prefix=DIR3// RUN: %clangxx --target=x86_64-linux-gnu -fmemory-profile -fno-memory-profile %s -### 2>&1 | FileCheck %s --check-prefix=OFF4// RUN: %clangxx --target=x86_64-linux-gnu -fmemory-profile=foo -fno-memory-profile %s -### 2>&1 | FileCheck %s --check-prefix=OFF5// CHECK: "-cc1" {{.*}} "-fmemory-profile"6// CHECK: ld{{.*}}libclang_rt.memprof{{.*}}libclang_rt.memprof_cxx7// DIR: "-cc1" {{.*}} "-fmemory-profile=foo"8// DIR: ld{{.*}}libclang_rt.memprof{{.*}}libclang_rt.memprof_cxx9// OFF-NOT: "-fmemory-profile"10// OFF-NOT: libclang_rt.memprof11 12// RUN: %clangxx --target=x86_64-linux-gnu -fmemory-profile-use=foo %s -### 2>&1 | FileCheck %s --check-prefix=USE13// USE: "-cc1" {{.*}} "-fmemory-profile-use=foo"14 15// RUN: not %clangxx --target=x86_64-linux-gnu -fmemory-profile -fmemory-profile-use=foo %s -### 2>&1 | FileCheck %s --check-prefix=CONFLICTWITHMEMPROFINSTR16// CONFLICTWITHMEMPROFINSTR: error: invalid argument '-fmemory-profile-use=foo' not allowed with '-fmemory-profile'17 18// RUN: not %clangxx --target=x86_64-linux-gnu -fprofile-generate -fmemory-profile-use=foo %s -### 2>&1 | FileCheck %s --check-prefix=CONFLICTWITHPGOINSTR19// CONFLICTWITHPGOINSTR: error: invalid argument '-fmemory-profile-use=foo' not allowed with '-fprofile-generate'20 21// Test that we export the __memprof_default_options_str on Darwin because it has WeakAnyLinkage22// RUN: %clangxx --target=arm64-apple-ios -fmemory-profile %s -### 2>&1 | FileCheck %s --check-prefix=EXPORT-BASE --implicit-check-not=exported_symbol23// RUN: %clangxx --target=arm64-apple-ios -fmemory-profile -exported_symbols_list /dev/null %s -### 2>&1 | FileCheck %s --check-prefixes=EXPORT-BASE,EXPORT24// FIXME: Darwin needs to link in the runtime, then we can use the regular CHECK prefix25// EXPORT-BASE: "-cc1" {{.*}} "-fmemory-profile"26// EXPORT: "-exported_symbol" "___memprof_default_options_str"27