diff options
Diffstat (limited to 'lld/lib/Core/InputGraph.cpp')
| -rw-r--r-- | lld/lib/Core/InputGraph.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lld/lib/Core/InputGraph.cpp b/lld/lib/Core/InputGraph.cpp index c269b0d40d2..5d8009ffb6e 100644 --- a/lld/lib/Core/InputGraph.cpp +++ b/lld/lib/Core/InputGraph.cpp @@ -86,10 +86,11 @@ void InputGraph::normalize() { /// \brief Read the file into _buffer. std::error_code FileNode::getBuffer(StringRef filePath) { // Create a memory buffer - std::unique_ptr<MemoryBuffer> mb; - if (std::error_code ec = MemoryBuffer::getFileOrSTDIN(filePath, mb)) + ErrorOr<std::unique_ptr<MemoryBuffer>> mb = + MemoryBuffer::getFileOrSTDIN(filePath); + if (std::error_code ec = mb.getError()) return ec; - _buffer = std::move(mb); + _buffer = std::move(mb.get()); return std::error_code(); } |

