[PATCH] D44757: [InstrProf] Fix test failures introduced by D44717

Mircea Trofin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 21 14:56:58 PDT 2018


mtrofin created this revision.
Herald added a subscriber: llvm-commits.

- Fixed windows-only failure by output-ing test to a file

(since /dev/null doesn't exist on windows)

- Fixed unittest failure by encapsulating access to AddrToMD5Map.

https://reviews.llvm.org/D44717 introduced lazy sorting of the internal data structures of the
symbol table. The AddrToMD5Map getter was potentially exposing
inconsistent (unsorted) state. We could sort in the accessor, however,
a client may store the pointer and thus bypass the internal state
management of the symbol table. The alternative in this CL blocks
direct access to the state, thus ensuring consistent
externally-observable state.


Repository:
  rL LLVM

https://reviews.llvm.org/D44757

Files:
  include/llvm/ProfileData/InstrProf.h
  include/llvm/ProfileData/InstrProfData.inc
  include/llvm/ProfileData/InstrProfReader.h
  lib/ProfileData/InstrProf.cpp
  lib/ProfileData/InstrProfReader.cpp
  test/tools/llvm-profdata/invalid-profdata.test
  unittests/ProfileData/InstrProfTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D44757.139375.patch
Type: text/x-patch
Size: 8601 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180321/faf7c895/attachment.bin>


More information about the llvm-commits mailing list