130308f42SjoergRUN: mkdir -p %t.d 230308f42SjoergRUN: %clang_profgen -o %t.d/func.shared -fPIC -shared %S/Inputs/instrprof-dlopen-func.c 330308f42SjoergRUN: %clang_profgen -o %t.d/func2.shared -fPIC -shared %S/Inputs/instrprof-dlopen-func2.c 4*ef84fd3bSjoergRUN: %clang -o %t-local -fPIC -DDLOPEN_FUNC_DIR=\"%t.d\" -DDLOPEN_FLAGS="RTLD_LAZY | RTLD_LOCAL" %S/Inputs/instrprof-dlopen-main.c 5*ef84fd3bSjoergRUN: %clang -o %t-global -fPIC -DDLOPEN_FUNC_DIR=\"%t.d\" -DDLOPEN_FLAGS="RTLD_LAZY | RTLD_GLOBAL" %S/Inputs/instrprof-dlopen-main.c 630308f42Sjoerg 730308f42SjoergRUN: %clang -c -o %t.d/main.o %S/Inputs/instrprof-dlopen-main.c 830308f42SjoergRUN: %clang_profgen -o %t-static %S/Inputs/instrprof-dlopen-func.c %S/Inputs/instrprof-dlopen-func2.c %t.d/main.o 930308f42Sjoerg 1030308f42SjoergRUN: env LLVM_PROFILE_FILE=%t-static.profraw %run %t-static 1130308f42SjoergRUN: env LLVM_PROFILE_FILE=%t-local.profraw %run %t-local 1230308f42SjoergRUN: env LLVM_PROFILE_FILE=%t-global.profraw %run %t-global 1330308f42Sjoerg 1430308f42SjoergRUN: llvm-profdata merge -o %t-static.profdata %t-static.profraw 1530308f42SjoergRUN: llvm-profdata merge -o %t-local.profdata %t-local.profraw 1630308f42SjoergRUN: llvm-profdata merge -o %t-global.profdata %t-global.profraw 1730308f42Sjoerg 1830308f42SjoergRUN: %clang_profuse=%t-static.profdata -o %t-func.static.ll -S -emit-llvm %S/Inputs/instrprof-dlopen-func.c 1930308f42SjoergRUN: %clang_profuse=%t-local.profdata -o %t-func.local.ll -S -emit-llvm %S/Inputs/instrprof-dlopen-func.c 2030308f42SjoergRUN: %clang_profuse=%t-global.profdata -o %t-func.global.ll -S -emit-llvm %S/Inputs/instrprof-dlopen-func.c 2130308f42SjoergRUN: diff %t-func.static.ll %t-func.local.ll 2230308f42SjoergRUN: diff %t-func.static.ll %t-func.global.ll 2330308f42Sjoerg 2430308f42SjoergRUN: %clang_profuse=%t-static.profdata -o %t-func2.static.ll -S -emit-llvm %S/Inputs/instrprof-dlopen-func2.c 2530308f42SjoergRUN: %clang_profuse=%t-local.profdata -o %t-func2.local.ll -S -emit-llvm %S/Inputs/instrprof-dlopen-func2.c 2630308f42SjoergRUN: %clang_profuse=%t-global.profdata -o %t-func2.global.ll -S -emit-llvm %S/Inputs/instrprof-dlopen-func2.c 2730308f42SjoergRUN: diff %t-func2.static.ll %t-func2.local.ll 2830308f42SjoergRUN: diff %t-func2.static.ll %t-func2.global.ll 2930308f42Sjoerg 3030308f42SjoergRUN: %clang_profuse=%t-static.profdata -o %t-main.static.ll -S -emit-llvm %S/Inputs/instrprof-dlopen-main.c 3130308f42SjoergRUN: %clang_profuse=%t-local.profdata -o %t-main.local.ll -S -emit-llvm %S/Inputs/instrprof-dlopen-main.c 3230308f42SjoergRUN: %clang_profuse=%t-local.profdata -o %t-main.global.ll -S -emit-llvm %S/Inputs/instrprof-dlopen-main.c 3330308f42SjoergRUN: diff %t-main.static.ll %t-main.local.ll 3430308f42SjoergRUN: diff %t-main.static.ll %t-main.global.ll 35