LLVM  10.0.0svn
TBEHandler.h
Go to the documentation of this file.
1 //===- TBEHandler.h ---------------------------------------------*- 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 /// \file
10 /// This file declares an interface for reading and writing .tbe (text-based
11 /// ELF) files.
12 ///
13 //===-----------------------------------------------------------------------===/
14 
15 #ifndef LLVM_TEXTAPI_ELF_TBEHANDLER_H
16 #define LLVM_TEXTAPI_ELF_TBEHANDLER_H
17 
19 #include "llvm/Support/Error.h"
20 #include <memory>
21 
22 namespace llvm {
23 
24 class raw_ostream;
25 class Error;
26 class StringRef;
27 class VersionTuple;
28 
29 namespace elfabi {
30 
31 class ELFStub;
32 
33 const VersionTuple TBEVersionCurrent(1, 0);
34 
35 /// Attempts to read an ELF interface file from a StringRef buffer.
36 Expected<std::unique_ptr<ELFStub>> readTBEFromBuffer(StringRef Buf);
37 
38 /// Attempts to write an ELF interface file to a raw_ostream.
39 Error writeTBEToOutputStream(raw_ostream &OS, const ELFStub &Stub);
40 
41 } // end namespace elfabi
42 } // end namespace llvm
43 
44 #endif // LLVM_TEXTAPI_ELF_TBEHANDLER_H
This class represents lattice values for constants.
Definition: AllocatorList.h:23
Error writeTBEToOutputStream(raw_ostream &OS, const ELFStub &Stub)
Attempts to write an ELF interface file to a raw_ostream.
Definition: TBEHandler.cpp:155
const VersionTuple TBEVersionCurrent(1, 0)
Defines the llvm::VersionTuple class, which represents a version in the form major[.minor[.subminor]].
Expected< std::unique_ptr< ELFStub > > readTBEFromBuffer(StringRef Buf)
Attempts to read an ELF interface file from a StringRef buffer.
Definition: TBEHandler.cpp:145