1// UNSUPPORTED: windows
2// REQUIRES: darwin
3// RUN: rm -rf %t.dir && mkdir -p %t.dir
4// RUN: cd %t.dir
5//
6// RUN: %clang -forder-file-instrumentation -O1 -o %t.2 %S/Inputs/instrprof-order-file-2.c %S/Inputs/instrprof-order-file.c -mllvm -orderfile-write-mapping="mapping.txt"
7// RUN: %run %t.2 ANY
8// RUN: od -h default.profraw.order | FileCheck %s
9// RUN: cat mapping.txt | FileCheck %s --check-prefix=MAPPING
10
11// Make sure we have MD5 for main, then f, then g.
12// CHECK: 0000000      d5fa    e78d    6436    db95    a18f    dd4c    4f75    cc91
13// CHECK: 0000020      f5b2    47ff    6643    b671    0000    0000    0000    0000
14
15// MAPPING: MD5 cc914f75dd4ca18f f
16// MAPPING: MD5 b671664347fff5b2 g
17// MAPPING: MD5 db956436e78dd5fa main
18