diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2016-05-29 10:31:00 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2016-05-29 10:31:00 +0000 |
commit | 2ff22b74ed49f84211ba07ddecf8f3740ee5c785 (patch) | |
tree | ae5038c3eb7e36d2ababda361cd6a7d1c9ee539f /lib/ProfileData/InstrProfReader.cpp | |
parent | a83f08e633465e46ebb75c17475754a8c7075d20 (diff) |
[ProfileData] Clean up string handling a bit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271180 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/ProfileData/InstrProfReader.cpp')
-rw-r--r-- | lib/ProfileData/InstrProfReader.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/ProfileData/InstrProfReader.cpp b/lib/ProfileData/InstrProfReader.cpp index a7d8fcf76e1..81c13b35ce3 100644 --- a/lib/ProfileData/InstrProfReader.cpp +++ b/lib/ProfileData/InstrProfReader.cpp @@ -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()) |