diff options
author | Vedant Kumar <vsk@apple.com> | 2019-10-19 00:46:53 +0000 |
---|---|---|
committer | Vedant Kumar <vsk@apple.com> | 2019-10-19 00:46:53 +0000 |
commit | d59bde52167f18b585d2828a8fd83506ee14fd0e (patch) | |
tree | 531aa058f79514312fc72afe4a91a82029abaf8d /test/profile/Posix/instrprof-get-filename-merge-mode.c | |
parent | b19457ce72921f7eef9645b327337c933657e878 (diff) | |
download | compiler-rt-d59bde52167f18b585d2828a8fd83506ee14fd0e.tar.gz |
[profile] Disable instrprof-get-filename-merge-mode.c on Windows
The Windows bots are failing with:
clang: warning: argument unused during compilation: '-dynamiclib' [-Wunused-command-line-argument]
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@375315 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/profile/Posix/instrprof-get-filename-merge-mode.c')
-rw-r--r-- | test/profile/Posix/instrprof-get-filename-merge-mode.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/profile/Posix/instrprof-get-filename-merge-mode.c b/test/profile/Posix/instrprof-get-filename-merge-mode.c new file mode 100644 index 000000000..c6e2fca22 --- /dev/null +++ b/test/profile/Posix/instrprof-get-filename-merge-mode.c @@ -0,0 +1,18 @@ +// Test __llvm_profile_get_filename when the on-line merging mode is enabled. +// +// RUN: %clang_pgogen -dynamiclib -o %t.dso %p/Inputs/instrprof-get-filename-dso.c +// RUN: %clang_pgogen -o %t %s %t.dso +// RUN: env LLVM_PROFILE_FILE="%t-%m.profraw" %run %t + +#include <string.h> + +const char *__llvm_profile_get_filename(void); +extern const char *get_filename_from_DSO(void); + +int main(int argc, const char *argv[]) { + const char *filename1 = __llvm_profile_get_filename(); + const char *filename2 = get_filename_from_DSO(); + + // Exit with code 1 if the two filenames are the same. + return strcmp(filename1, filename2) == 0; +} |