1 //===- TBEHandler.h ---------------------------------------------*- C++ -*-===//
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
7 //===-----------------------------------------------------------------------===/
10 /// This file declares an interface for reading and writing .tbe (text-based
13 //===-----------------------------------------------------------------------===/
15 #ifndef LLVM_TEXTAPI_ELF_TBEHANDLER_H
16 #define LLVM_TEXTAPI_ELF_TBEHANDLER_H
18 #include "llvm/Support/VersionTuple.h"
19 #include "llvm/Support/Error.h"
33 const VersionTuple
TBEVersionCurrent(1, 0);
35 /// Attempts to read an ELF interface file from a StringRef buffer.
36 Expected
<std::unique_ptr
<ELFStub
>> readTBEFromBuffer(StringRef Buf
);
38 /// Attempts to write an ELF interface file to a raw_ostream.
39 Error
writeTBEToOutputStream(raw_ostream
&OS
, const ELFStub
&Stub
);
41 } // end namespace elfabi
42 } // end namespace llvm
44 #endif // LLVM_TEXTAPI_ELF_TBEHANDLER_H