LLVM 22.0.0git
TextAPIReader.h
Go to the documentation of this file.
1//===--- TextAPIReader.h - Text API Reader ----------------------*- C++ -*-===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8
9#ifndef LLVM_TEXTAPI_TEXTAPIREADER_H
10#define LLVM_TEXTAPI_TEXTAPIREADER_H
11
13#include "llvm/Support/Error.h"
14
15namespace llvm {
16
17class MemoryBufferRef;
18
19namespace MachO {
20
21class InterfaceFile;
22enum FileType : unsigned;
23
25public:
26 /// Determine whether input can be interpreted as TAPI text file.
27 /// This allows one to exit early when file is not recognized as TAPI file
28 /// as opposed to `get` which attempts to full parse and load of library
29 /// attributes.
30 ///
31 /// \param InputBuffer Buffer holding contents of TAPI text file.
32 /// \return The file format version of TAPI text file.
34
35 /// Parse and get an InterfaceFile that represents the full
36 /// library.
37 ///
38 /// \param InputBuffer Buffer holding contents of TAPI text file.
40 get(MemoryBufferRef InputBuffer);
41
42 TextAPIReader() = delete;
43};
44
45} // end namespace MachO.
46} // end namespace llvm.
47
48#endif // LLVM_TEXTAPI_TEXTAPIREADER_H
#define LLVM_ABI
Definition Compiler.h:213
Tagged union holding either a T or a Error.
Definition Error.h:485
Defines the interface file.
static LLVM_ABI Expected< FileType > canRead(MemoryBufferRef InputBuffer)
Determine whether input can be interpreted as TAPI text file.
static LLVM_ABI Expected< std::unique_ptr< InterfaceFile > > get(MemoryBufferRef InputBuffer)
Parse and get an InterfaceFile that represents the full library.
FileType
Defines the file type TextAPI files can represent.
Definition FileTypes.h:15
This is an optimization pass for GlobalISel generic memory operations.