From c79283ef2912095de447295c0b49916cf2504ad0 Mon Sep 17 00:00:00 2001 From: Xinliang David Li Date: Fri, 11 Dec 2015 19:53:19 +0000 Subject: [PGO] Stop using invalid char in instr variable names. Before the patch, -fprofile-instr-generate compile will fail if no integrated-as is specified when the file contains any static functions (the -S output is also invalid). This patch fixed the issue. With the change, the index format version will be bumped up by 1. Backward compatibility is preserved with this change. Differential Revision: http://reviews.llvm.org/D15243 llvm-svn: 255365 --- llvm/test/tools/llvm-profdata/Inputs/compat.profdata.v4 | Bin 0 -> 816 bytes llvm/test/tools/llvm-profdata/compat.proftext | 7 +++++++ 2 files changed, 7 insertions(+) create mode 100644 llvm/test/tools/llvm-profdata/Inputs/compat.profdata.v4 (limited to 'llvm/test/tools') diff --git a/llvm/test/tools/llvm-profdata/Inputs/compat.profdata.v4 b/llvm/test/tools/llvm-profdata/Inputs/compat.profdata.v4 new file mode 100644 index 00000000000..1720c407282 Binary files /dev/null and b/llvm/test/tools/llvm-profdata/Inputs/compat.profdata.v4 differ diff --git a/llvm/test/tools/llvm-profdata/compat.proftext b/llvm/test/tools/llvm-profdata/compat.proftext index 139202d162e..5bc6c9a7369 100644 --- a/llvm/test/tools/llvm-profdata/compat.proftext +++ b/llvm/test/tools/llvm-profdata/compat.proftext @@ -65,3 +65,10 @@ large_numbers # FORMATV2-NEXT: Maximum internal block count: 1000000 +# RUN: llvm-profdata show %S/Inputs/compat.profdata.v4 -all-functions --counts | FileCheck %s -check-prefix=FORMATV4 +# FORMATV4: instrprof.c__foo_static: +# FORMATV4-NEXT: Hash: 0x000000000000000a +# FORMATV4-NEXT: Counters: 2 +# FORMATV4-NEXT: Function count: 500500 +# FORMATV4-NEXT: Block counts: [180100] + -- cgit v1.2.3