llvm-project/clang/test/Profile/c-outdated-data.c
Justin Bogner ffaa2330b9 test: Regenerate profile data for PGO tests
Some of this data had gotten out of date, so we weren't quite testing
what we thought we were. This also moves the outdated data test to its
own file to simplify regenerating the test data.

llvm-svn: 203546
2014-03-11 06:49:34 +00:00

25 lines
643 B
C

// Test that outdated data is ignored.
// RUN: %clang_cc1 -triple x86_64-apple-macosx10.9 -main-file-name c-outdated-data.c %s -o - -emit-llvm -fprofile-instr-use=%S/Inputs/c-outdated-data.profdata | FileCheck -check-prefix=PGOUSE %s
// TODO: We should have a warning or a remark that tells us the profile data was
// discarded, rather than just checking that we fail to add metadata.
// PGOUSE-LABEL: @no_usable_data()
void no_usable_data() {
int i = 0;
if (i) {}
#ifdef GENERATE_OUTDATED_DATA
if (i) {}
#endif
// PGOUSE-NOT: br {{.*}} !prof ![0-9]+
}
int main(int argc, const char *argv[]) {
no_usable_data();
return 0;
}