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
diff --git a/clang/test/Profile/c-outdated-data.c b/clang/test/Profile/c-outdated-data.c
new file mode 100644
index 0000000..fe5a5c7
--- /dev/null
+++ b/clang/test/Profile/c-outdated-data.c
@@ -0,0 +1,24 @@
+// 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;
+}