Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-05-10 08:44:38

0001 //===- llvm/TextAPI/TextAPIError.h - TAPI Error -----------------*- C++ -*-===//
0002 //
0003 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
0004 // See https://llvm.org/LICENSE.txt for license information.
0005 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
0006 //
0007 //===----------------------------------------------------------------------===//
0008 ///
0009 /// \file
0010 /// \brief Define TAPI specific error codes.
0011 ///
0012 //===----------------------------------------------------------------------===//
0013 
0014 #ifndef LLVM_TEXTAPI_TEXTAPIERROR_H
0015 #define LLVM_TEXTAPI_TEXTAPIERROR_H
0016 
0017 #include "llvm/Support/Error.h"
0018 
0019 namespace llvm::MachO {
0020 enum class TextAPIErrorCode {
0021   NoSuchArchitecture,
0022   EmptyResults,
0023   GenericFrontendError,
0024   InvalidInputFormat,
0025   UnsupportedTarget
0026 };
0027 
0028 class TextAPIError : public llvm::ErrorInfo<TextAPIError> {
0029 public:
0030   static char ID;
0031   TextAPIErrorCode EC;
0032   std::string Msg;
0033 
0034   TextAPIError(TextAPIErrorCode EC) : EC(EC) {}
0035   TextAPIError(TextAPIErrorCode EC, std::string Msg)
0036       : EC(EC), Msg(std::move(Msg)) {}
0037 
0038   void log(raw_ostream &OS) const override;
0039   std::error_code convertToErrorCode() const override;
0040 };
0041 
0042 } // namespace llvm::MachO
0043 #endif // LLVM_TEXTAPI_TEXTAPIERROR_H