Back to home page

EIC code displayed by LXR

 
 

    


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

0001 //===--- TextAPIReader.h - Text API Reader ----------------------*- 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 #ifndef LLVM_TEXTAPI_TEXTAPIREADER_H
0010 #define LLVM_TEXTAPI_TEXTAPIREADER_H
0011 
0012 #include "llvm/Support/Error.h"
0013 
0014 namespace llvm {
0015 
0016 class MemoryBufferRef;
0017 
0018 namespace MachO {
0019 
0020 class InterfaceFile;
0021 enum FileType : unsigned;
0022 
0023 class TextAPIReader {
0024 public:
0025   ///  Determine whether input can be interpreted as TAPI text file.
0026   ///  This allows one to exit early when file is not recognized as TAPI file
0027   ///  as opposed to `get` which attempts to full parse and load of library
0028   ///  attributes.
0029   ///
0030   /// \param InputBuffer Buffer holding contents of TAPI text file.
0031   /// \return The file format version of TAPI text file.
0032   static Expected<FileType> canRead(MemoryBufferRef InputBuffer);
0033 
0034   /// Parse and get an InterfaceFile that represents the full
0035   /// library.
0036   ///
0037   /// \param InputBuffer Buffer holding contents of TAPI text file.
0038   static Expected<std::unique_ptr<InterfaceFile>>
0039   get(MemoryBufferRef InputBuffer);
0040 
0041   TextAPIReader() = delete;
0042 };
0043 
0044 } // end namespace MachO.
0045 } // end namespace llvm.
0046 
0047 #endif // LLVM_TEXTAPI_TEXTAPIREADER_H