diff options
Diffstat (limited to 'COFF/Error.h')
-rw-r--r-- | COFF/Error.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/COFF/Error.h b/COFF/Error.h new file mode 100644 index 0000000000000..cb0a185f09179 --- /dev/null +++ b/COFF/Error.h @@ -0,0 +1,28 @@ +//===- Error.h --------------------------------------------------*- C++ -*-===// +// +// The LLVM Linker +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#ifndef LLD_COFF_ERROR_H +#define LLD_COFF_ERROR_H + +#include "lld/Core/LLVM.h" + +namespace lld { +namespace coff { + +LLVM_ATTRIBUTE_NORETURN void error(const Twine &Msg); +void error(std::error_code EC, const Twine &Prefix); + +template <typename T> void error(const ErrorOr<T> &V, const Twine &Prefix) { + error(V.getError(), Prefix); +} + +} // namespace coff +} // namespace lld + +#endif |