[profile] update test case with interface change.

See http://reviews.llvm.org/D22613, http://reviews.llvm.org/D22614

llvm-svn: 276356
This commit is contained in:
Xinliang David Li 2016-07-21 23:19:39 +00:00
parent e953933a9f
commit 9081de2e32
2 changed files with 3 additions and 10 deletions

View File

@ -3,9 +3,7 @@
// RUN: %clang_cc1 %s -o - -emit-llvm -fprofile-instrument=none | FileCheck %s --check-prefix=PROF-INSTR-NONE
// RUN: not %clang_cc1 %s -o - -emit-llvm -fprofile-instrument=garbage 2>&1 | FileCheck %s --check-prefix=PROF-INSTR-GARBAGE
//
// PROF-INSTR-PATH: private constant [24 x i8] c"c-generate-test.profraw\00"
// PROF-INSTR-PATH: call void @__llvm_profile_override_default_filename(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @0, i32 0, i32 0))
// PROF-INSTR-PATH: declare void @__llvm_profile_override_default_filename(i8*)
// PROF-INSTR-PATH: constant [24 x i8] c"c-generate-test.profraw\00"
//
// PROF-INSTR-NONE-NOT: @__profn_main
// PROF-INSTR-GARBAGE: invalid PGO instrumentor in argument '-fprofile-instrument=garbage'

View File

@ -7,17 +7,12 @@
// -fprofile-use=<dir> Uses the profile file <dir>/default.profdata
// -fprofile-use=<dir>/file Uses the profile file <dir>/file
// FIXME: IRPGO shouldn't use the override API when no profraw name is given.
// Check that -fprofile-generate overrides the default profraw.
// RUN: %clang %s -c -S -o - -emit-llvm -fprofile-generate | FileCheck -check-prefix=PROFILE-GEN %s
// PROFILE-GEN: call void @__llvm_profile_override_default_filename
// PROFILE-GEN: declare void @__llvm_profile_override_default_filename(i8*)
// PROFILE-GEN: __llvm_profile_filename
// Check that -fprofile-generate=/path/to generates /path/to/default.profraw
// RUN: %clang %s -c -S -o - -emit-llvm -fprofile-generate=/path/to | FileCheck -check-prefix=PROFILE-GEN-EQ %s
// PROFILE-GEN-EQ: private constant [25 x i8] c"/path/to{{/|\\5C}}default.profraw\00"
// PROFILE-GEN-EQ: call void @__llvm_profile_override_default_filename(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @0, i32 0, i32 0))
// PROFILE-GEN-EQ: declare void @__llvm_profile_override_default_filename(i8*)
// PROFILE-GEN-EQ: constant [25 x i8] c"/path/to{{/|\\5C}}default.profraw\00"
// Check that -fprofile-use=some/path reads some/path/default.profdata
// RUN: rm -rf %t.dir