mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-24 22:24:54 +00:00
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
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user