Commit Graph

9 Commits

Author SHA1 Message Date
Justin Bogner
ca3fdca101 Revert "InstrProf: Add unit tests for the profile reader and writer"
This added API to the InstrProfWriter to write to a string so I could
write unittests without using temp files. This doesn't really work,
since the format has tighter alignment requirements than a char.

This reverts r229478 and its follow-up, r229481.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229483 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-17 09:21:43 +00:00
Justin Bogner
2c388f7653 InstrProf: Add missing header from r229478
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229481 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-17 08:26:06 +00:00
Justin Bogner
e7b8243e9a Re-apply "InstrProf: Add unit tests for the profile reader and writer"
Add these tests again, but use va_list instead of initializer lists.

This reverts r229456, reapplying r229455.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229478 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-17 07:50:59 +00:00
Justin Bogner
a6f04a4ba7 InstrProf: Use a test fixture in the coverage mapping tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229473 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-17 06:56:49 +00:00
Justin Bogner
a9c73c5bc0 Revert "InstrProf: Add unit tests for the profile reader and writer"
Looks like the bots don't like my initializer lists.

This reverts r229455

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229456 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-16 23:31:07 +00:00
Justin Bogner
77ae39453c InstrProf: Add unit tests for the profile reader and writer
This required some minor API to be added to these types to avoid
needing temp files.

Also, I've used initializer lists in the tests, as MSVC 2013 claims to
support them. I'll redo this without them if the bots complain.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229455 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-16 23:27:48 +00:00
Justin Bogner
0a45405fdb InstrProf: Avoid using std::to_string
Apparently std::to_string doesn't exist in mingw32:

    http://lab.llvm.org:8011/builders/clang-native-mingw32-win7/builds/7990
    https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52015

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228340 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-05 19:54:27 +00:00
Justin Bogner
341ed28f16 InstrProf: std::to_string needs to #include <string>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228136 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-04 11:19:16 +00:00
Justin Bogner
ff966308e1 InstrProf: Add some unit tests for CoverageMapping
The llvm-level tests for coverage mapping need a binary input file,
which means they're hard to understand, hard to update, and it's
difficult to add new ones. By adding some unit tests that build up the
coverage data structures in C++, we can write more meaningful and
targeted tests.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228084 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-04 00:15:12 +00:00