[PATCH] D32512: [gcov] Sort file info before printing it

Vedant Kumar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 25 17:16:55 PDT 2017


vsk created this revision.

The order in which GCOV file info is printed depends on the string hash
function. This makes some GCOV tests brittle, because the tests must be
updated whenever the hash function changes.

Sort the filenames before printing out the file info to solve the
problem. This should be relatively cheap.


https://reviews.llvm.org/D32512

Files:
  lib/IR/GCOV.cpp
  test/tools/llvm-cov/Inputs/test_-b.output
  test/tools/llvm-cov/Inputs/test_-f.output
  test/tools/llvm-cov/Inputs/test_long_file_names.output
  test/tools/llvm-cov/Inputs/test_long_paths.output
  test/tools/llvm-cov/Inputs/test_missing.output
  test/tools/llvm-cov/Inputs/test_no_gcda.output
  test/tools/llvm-cov/Inputs/test_no_options.output
  test/tools/llvm-cov/Inputs/test_no_output.output
  test/tools/llvm-cov/Inputs/test_no_preserve_paths.output
  test/tools/llvm-cov/Inputs/test_preserve_paths.output

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D32512.96654.patch
Type: text/x-patch
Size: 7279 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170426/653ef592/attachment.bin>


More information about the llvm-commits mailing list