summaryrefslogtreecommitdiffstats
path: root/compiler-rt/test/profile/instrprof-version-mismatch.c
diff options
context:
space:
mode:
Diffstat (limited to 'compiler-rt/test/profile/instrprof-version-mismatch.c')
-rw-r--r--compiler-rt/test/profile/instrprof-version-mismatch.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/compiler-rt/test/profile/instrprof-version-mismatch.c b/compiler-rt/test/profile/instrprof-version-mismatch.c
new file mode 100644
index 00000000000..49ce41177d3
--- /dev/null
+++ b/compiler-rt/test/profile/instrprof-version-mismatch.c
@@ -0,0 +1,11 @@
+// RUN: %clang_profgen -o %t -O3 %s
+// RUN: LLVM_PROFILE_VERBOSE_ERRORS=1 %run %t 1 2>&1 | FileCheck %s
+
+// override the version variable with a bogus version:
+unsigned long long __llvm_profile_raw_version = 10000;
+int main(int argc, const char *argv[]) {
+ if (argc < 2)
+ return 1;
+ return 0;
+}
+// CHECK: LLVM Profile: runtime and instrumentation version mismatch
OpenPOWER on IntegriCloud