summaryrefslogtreecommitdiffstats
path: root/llvm/test/tools
diff options
context:
space:
mode:
authorVedant Kumar <vsk@apple.com>2016-06-06 22:39:22 +0000
committerVedant Kumar <vsk@apple.com>2016-06-06 22:39:22 +0000
commitd8ee75b8f549f6f065a56e680f87e669717d6c7f (patch)
tree0d51ebcdc2846c08fd953a28604d3af1a805204b /llvm/test/tools
parent71bb79430faf46e41baa55ab40d467af2b742d6b (diff)
downloadbcm5719-llvm-d8ee75b8f549f6f065a56e680f87e669717d6c7f.tar.gz
bcm5719-llvm-d8ee75b8f549f6f065a56e680f87e669717d6c7f.zip
Retry "[llvm-profdata] Add option to ingest filepaths from a file"
Changes since the initial commit: - Normalize file paths read from the file to prevent Windows path separators from escaping parts of the path. - Since we need to store the normalized file paths in WeightedFile, don't do tricky things to keep the source MemoryBuffer alive. Differential Revision: http://reviews.llvm.org/D20980 llvm-svn: 271949
Diffstat (limited to 'llvm/test/tools')
-rw-r--r--llvm/test/tools/llvm-profdata/input-filenames.test16
1 files changed, 16 insertions, 0 deletions
diff --git a/llvm/test/tools/llvm-profdata/input-filenames.test b/llvm/test/tools/llvm-profdata/input-filenames.test
new file mode 100644
index 00000000000..5d8d27b6dda
--- /dev/null
+++ b/llvm/test/tools/llvm-profdata/input-filenames.test
@@ -0,0 +1,16 @@
+RUN: printf '# comment 1\n' > %t
+RUN: printf ' # comment 2\n' >> %t
+
+RUN: printf 'bar\n' >> %t
+RUN: printf ' baz\n' >> %t
+
+RUN: printf '2,%t.weighted\n' >> %t
+RUN: printf ' ' > %t.weighted
+
+RUN: llvm-profdata merge -input-files %t -dump-input-file-list foo -o /dev/null | FileCheck %s
+RUN: llvm-profdata merge -f %t -dump-input-file-list foo -o /dev/null | FileCheck %s
+
+CHECK: 1,foo
+CHECK-NEXT: 1,bar
+CHECK-NEXT: 1,baz
+CHECK-NEXT: 2,{{.*}}.weighted
OpenPOWER on IntegriCloud