Re-apply "InstrProf: Add unit tests for the profile reader and writer"
authorJustin Bogner <mail@justinbogner.com>
Wed, 18 Feb 2015 01:58:17 +0000 (01:58 +0000)
committerJustin Bogner <mail@justinbogner.com>
Wed, 18 Feb 2015 01:58:17 +0000 (01:58 +0000)
commit09e5af7d611387f03e7c5051ef44420e4ee0c6e9
treeef1cf24c37578aba16acbfb49ec4c52d28118bc7
parent62be98d5105a925175a2e8107b76ca377e2ce5b3
Re-apply "InstrProf: Add unit tests for the profile reader and writer"

Have the InstrProfWriter return a MemoryBuffer instead of a
std::string. This fixes the alignment issues the reader would hit, and
it's a more appropriate type for this anyway.

I've also removed an ugly helper function that's not needed since
we're allowing initializer lists now, and updated some error code
checks based on MSVC's issues with r229473.

This reverts r229483, reapplying r229478.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229602 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/ProfileData/InstrProfReader.h
include/llvm/ProfileData/InstrProfWriter.h
lib/ProfileData/InstrProfReader.cpp
lib/ProfileData/InstrProfWriter.cpp
unittests/ProfileData/CMakeLists.txt
unittests/ProfileData/InstrProfTest.cpp [new file with mode: 0644]