1 // Test that outdated data is ignored. 2 3 // FIXME: It would be nice to use -verify here instead of FileCheck, but -verify 4 // doesn't play well with warnings that have no line number. 5 6 // RUN: %clang_cc1 -triple x86_64-apple-macosx10.9 -main-file-name c-outdated-data.c %s -o /dev/null -emit-llvm -fprofile-instr-use=%S/Inputs/c-outdated-data.profdata -Wprofile-instr-dropped 2>&1 | FileCheck %s 7 // CHECK: warning: profile data may be out of date: of 3 functions, 1 has no data and 1 has mismatched data that will be ignored 8 9 void no_usable_data() { 10 int i = 0; 11 12 if (i) {} 13 14 #ifdef GENERATE_OUTDATED_DATA 15 if (i) {} 16 #endif 17 } 18 19 #ifndef GENERATE_OUTDATED_DATA 20 void no_data() { 21 } 22 #endif 23 24 int main(int argc, const char *argv[]) { 25 no_usable_data(); 26 return 0; 27 } 28