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
This commit is contained in:
Justin Bogner
2015-02-17 07:50:59 +00:00
parent 7df4cae5a9
commit e7b8243e9a
6 changed files with 153 additions and 16 deletions

View File

@ -95,6 +95,9 @@ public:
/// Factory method to create an appropriately typed reader for the given
/// instrprof file.
static ErrorOr<std::unique_ptr<InstrProfReader>> create(std::string Path);
static ErrorOr<std::unique_ptr<InstrProfReader>>
create(std::unique_ptr<MemoryBuffer> Buffer);
};
/// Reader for the simple text based instrprof format.
@ -294,6 +297,9 @@ public:
/// Factory method to create an indexed reader.
static ErrorOr<std::unique_ptr<IndexedInstrProfReader>>
create(std::string Path);
static ErrorOr<std::unique_ptr<IndexedInstrProfReader>>
create(std::unique_ptr<MemoryBuffer> Buffer);
};
} // end namespace llvm