mirror of
https://github.com/RPCS3/llvm.git
synced 2026-07-21 03:05:26 -04:00
[ProfileData] Clean up string handling a bit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271180 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -19,7 +19,7 @@
|
||||
using namespace llvm;
|
||||
|
||||
static Expected<std::unique_ptr<MemoryBuffer>>
|
||||
setupMemoryBuffer(std::string Path) {
|
||||
setupMemoryBuffer(const Twine &Path) {
|
||||
ErrorOr<std::unique_ptr<MemoryBuffer>> BufferOrErr =
|
||||
MemoryBuffer::getFileOrSTDIN(Path);
|
||||
if (std::error_code EC = BufferOrErr.getError())
|
||||
@@ -32,7 +32,7 @@ static Error initializeReader(InstrProfReader &Reader) {
|
||||
}
|
||||
|
||||
Expected<std::unique_ptr<InstrProfReader>>
|
||||
InstrProfReader::create(std::string Path) {
|
||||
InstrProfReader::create(const Twine &Path) {
|
||||
// Set up the buffer to read.
|
||||
auto BufferOrError = setupMemoryBuffer(Path);
|
||||
if (Error E = BufferOrError.takeError())
|
||||
@@ -67,7 +67,7 @@ InstrProfReader::create(std::unique_ptr<MemoryBuffer> Buffer) {
|
||||
}
|
||||
|
||||
Expected<std::unique_ptr<IndexedInstrProfReader>>
|
||||
IndexedInstrProfReader::create(std::string Path) {
|
||||
IndexedInstrProfReader::create(const Twine &Path) {
|
||||
// Set up the buffer to read.
|
||||
auto BufferOrError = setupMemoryBuffer(Path);
|
||||
if (Error E = BufferOrError.takeError())
|
||||
|
||||
Reference in New Issue
Block a user