diff options
Diffstat (limited to 'llvm/lib/Transforms')
| -rw-r--r-- | llvm/lib/Transforms/Scalar/SampleProfile.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Scalar/SampleProfile.cpp b/llvm/lib/Transforms/Scalar/SampleProfile.cpp index 73c97ffeef4..56c57373a76 100644 --- a/llvm/lib/Transforms/Scalar/SampleProfile.cpp +++ b/llvm/lib/Transforms/Scalar/SampleProfile.cpp @@ -457,8 +457,8 @@ bool SampleModuleProfile::loadText() { M.getContext().diagnose(DiagnosticInfoSampleProfile(Filename.data(), Msg)); return false; } - std::unique_ptr<MemoryBuffer> Buffer = std::move(BufferOrErr.get()); - line_iterator LineIt(*Buffer, '#'); + MemoryBuffer &Buffer = *BufferOrErr.get(); + line_iterator LineIt(Buffer, '#'); // Read the profile of each function. Since each function may be // mentioned more than once, and we are collecting flat profiles, |

