summaryrefslogtreecommitdiff
path: root/llvm/include/llvm/Object/Error.h
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/include/llvm/Object/Error.h')
-rw-r--r--llvm/include/llvm/Object/Error.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/llvm/include/llvm/Object/Error.h b/llvm/include/llvm/Object/Error.h
index b7bbf06fc86de..07744188444ac 100644
--- a/llvm/include/llvm/Object/Error.h
+++ b/llvm/include/llvm/Object/Error.h
@@ -13,11 +13,13 @@
#ifndef LLVM_OBJECT_ERROR_H
#define LLVM_OBJECT_ERROR_H
-#include "llvm/ADT/Twine.h"
#include "llvm/Support/Error.h"
#include <system_error>
namespace llvm {
+
+class Twine;
+
namespace object {
class Binary;
@@ -49,7 +51,7 @@ inline std::error_code make_error_code(object_error e) {
/// Currently inherits from ECError for easy interoperability with
/// std::error_code, but this will be removed in the future.
class BinaryError : public ErrorInfo<BinaryError, ECError> {
- virtual void anchor();
+ void anchor() override;
public:
static char ID;
BinaryError() {
@@ -65,8 +67,8 @@ public:
class GenericBinaryError : public ErrorInfo<GenericBinaryError, BinaryError> {
public:
static char ID;
- GenericBinaryError(Twine Msg);
- GenericBinaryError(Twine Msg, object_error ECOverride);
+ GenericBinaryError(const Twine &Msg);
+ GenericBinaryError(const Twine &Msg, object_error ECOverride);
const std::string &getMessage() const { return Msg; }
void log(raw_ostream &OS) const override;
private: