diff options
Diffstat (limited to 'parallel-libs/streamexecutor/lib/Error.cpp')
-rw-r--r-- | parallel-libs/streamexecutor/lib/Error.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/parallel-libs/streamexecutor/lib/Error.cpp b/parallel-libs/streamexecutor/lib/Error.cpp index 1f9d4a7834d..0d728fab669 100644 --- a/parallel-libs/streamexecutor/lib/Error.cpp +++ b/parallel-libs/streamexecutor/lib/Error.cpp @@ -44,14 +44,13 @@ char StreamExecutorError::ID = 0; namespace streamexecutor { -Error make_error(Twine Message) { +Error make_error(const Twine &Message) { return llvm::make_error<StreamExecutorError>(Message.str()); } std::string consumeAndGetMessage(Error &&E) { - if (!E) { + if (!E) return "success"; - } std::string Message; llvm::handleAllErrors(std::move(E), [&Message](const StreamExecutorError &SEE) { |