36#include <system_error>
42void Archive::anchor() {}
45 std::string StringMsg =
"truncated or malformed archive (" +
Msg.str() +
")";
53 StringRef Msg(
"remaining size of archive too small for next archive "
65template <
class T, std::
size_t N>
89 return reinterpret_cast<const char *
>(
ArMemHdr) -
Parent->getData().data();
96 const char *RawHeaderPtr,
100 if (RawHeaderPtr ==
nullptr)
110 bool ValidTerminator =
112 ? (
ArMemHdr->Terminator[0] ==
'\x79' &&
115 if (!ValidTerminator) {
121 std::string
Msg(
"terminator characters in archive member \"" + Buf +
122 "\" not the correct \"`\\n\" values for the archive "
127 uint64_t
Offset = RawHeaderPtr -
Parent->getData().data();
138 const char *RawHeaderPtr,
142 if (RawHeaderPtr ==
nullptr)
148 *Err =
malformedError(
"malformed AIX big archive: remaining buffer is "
149 "unable to contain next archive member");
156 *Err = std::move(SubErr);
168 reinterpret_cast<const char *
>(
ArMemHdr) -
Parent->getData().data();
169 return malformedError(
"name contains a leading space for archive member "
170 "header at offset " +
195 " field in archive member header are not "
196 "all decimal numbers: '" +
199 "member header at offset " +
213 " field in archive member header are not "
214 "all octal numbers: '" +
217 "member header at offset " +
229 uint64_t NameLen = NameLenOrErr.
get();
233 uint64_t NameLenWithPadding =
alignTo(NameLen, 2);
237 if (!NameStringWithNameTerminator.
ends_with(NameTerminator)) {
239 reinterpret_cast<const char *
>(
ArMemHdr->Name + NameLenWithPadding) -
243 "name does not have name terminator \"`\\n\" for archive member"
244 "header at offset " +
258 uint64_t ArchiveOffset =
259 reinterpret_cast<const char *
>(
ArMemHdr) -
Parent->getData().data();
260 return malformedError(
"archive header truncated before the name field "
261 "for archive member header at offset " +
262 Twine(ArchiveOffset));
272 if (Name[0] ==
'/') {
273 if (Name.size() == 1)
275 if (Name.size() == 2 && Name[1] ==
'/')
279 if (Name ==
"/<XFGHASHMAP>/")
283 if (Name ==
"/<ECSYMBOLS>/")
287 std::size_t StringOffset;
288 if (Name.substr(1).rtrim(
' ').getAsInteger(10, StringOffset)) {
292 uint64_t ArchiveOffset =
293 reinterpret_cast<const char *
>(
ArMemHdr) -
Parent->getData().data();
294 return malformedError(
"long name offset characters after the '/' are "
295 "not all decimal numbers: '" +
296 Buf +
"' for archive member header at offset " +
297 Twine(ArchiveOffset));
301 if (StringOffset >=
Parent->getStringTable().size()) {
302 uint64_t ArchiveOffset =
303 reinterpret_cast<const char *
>(
ArMemHdr) -
Parent->getData().data();
305 " past the end of the string table for archive "
306 "member header at offset " +
307 Twine(ArchiveOffset));
313 size_t End =
Parent->getStringTable().find(
'\n', StringOffset);
315 Parent->getStringTable()[End - 1] !=
'/') {
317 Twine(StringOffset) +
" not terminated");
319 return Parent->getStringTable().slice(StringOffset, End - 1);
321 return Parent->getStringTable().begin() + StringOffset;
324 if (Name.starts_with(
"#1/")) {
326 if (Name.substr(3).rtrim(
' ').getAsInteger(10, NameLength)) {
330 uint64_t ArchiveOffset =
331 reinterpret_cast<const char *
>(
ArMemHdr) -
Parent->getData().data();
332 return malformedError(
"long name length characters after the #1/ are "
333 "not all decimal numbers: '" +
334 Buf +
"' for archive member header at offset " +
335 Twine(ArchiveOffset));
338 uint64_t ArchiveOffset =
339 reinterpret_cast<const char *
>(
ArMemHdr) -
Parent->getData().data();
341 " extends past the end of the member or archive "
342 "for archive member header at offset " +
343 Twine(ArchiveOffset));
351 if (Name[Name.size() - 1] !=
'/')
352 return Name.rtrim(
' ');
355 return Name.drop_back(1);
377 return *SizeOrErr +
alignTo(*NameLenOrErr, 2);
380template <std::
size_t N>
385 return Dst.str().rtrim(
" ").str();
389 const char *RawHeaderPtr,
427 reinterpret_cast<const char *
>(
ArMemHdr) -
Parent->getData().data();
432 *Err =
malformedError(
"name contains a leading space for archive member "
433 "header at offset " +
457 malformedError(
"LastModified field is empty or contains only spaces in "
458 "archive member header at offset " +
466 *Err =
malformedError(
"UID field is empty or contains only spaces in "
467 "archive member header at offset " +
475 *Err =
malformedError(
"GID field is empty or contains only spaces in "
476 "archive member header at offset " +
485 malformedError(
"AccessMode field is empty or contains only spaces in "
486 "archive member header at offset " +
505 if (!AccessModeOrErr)
540 return Parent->isThin() && Name !=
"/" && Name !=
"//" && Name !=
"/SYM64/";
559 const char *NextLoc =
562 if (NextLoc ==
Parent->getMemoryBufferRef().getBufferEnd())
574 if (!NextOffsetOrErr)
576 return Parent->getData().data() + NextOffsetOrErr.
get();
581 : Parent(Parent), Data(Data), StartOfFile(StartOfFile) {
582 Header = Parent->createArchiveMemberHeader(Data.data(), Data.size(),
nullptr);
593 Header = Parent->createArchiveMemberHeader(
594 Start, Parent->getData().size() - (Start - Parent->getData().data()),
601 assert(Err &&
"Err can't be nullptr if Start is not a nullptr");
610 uint64_t
Size = Header->getSizeOf();
629 StartOfFile = Header->getSizeOf();
641 StartOfFile += ((Name.size() + 1) >> 1) << 1;
642 }
else if (Name.starts_with(
"#1/")) {
644 StringRef RawNameSize = Name.substr(3).rtrim(
' ');
646 uint64_t
Offset = Start - Parent->getData().data();
647 *Err =
malformedError(
"long name length characters after the #1/ are "
648 "not all decimal numbers: '" +
650 "' for archive member header at offset " +
660 return Header->getSize();
661 return Data.size() - StartOfFile;
665 return Header->getSize();
668Expected<bool> Archive::Child::isThinMember()
const {
return Header->isThin(); }
673 return isThin.takeError();
680 return std::string(Name);
683 Parent->getMemoryBufferRef().getBufferIdentifier());
685 return std::string(FullName);
696 return Size.takeError();
702 const std::string &FullName = *FullNameOrErr;
705 if (std::error_code EC = Buf.
getError())
707 Parent->ThinBuffers.push_back(std::move(*Buf));
708 return Parent->ThinBuffers.back()->getBuffer();
716 const char *NextLoc = *NextLocOrErr;
719 if (NextLoc ==
nullptr)
720 return Child(
nullptr,
nullptr,
nullptr);
723 if (NextLoc > Parent->Data.getBufferEnd()) {
724 std::string
Msg(
"offset to next archive member past the end of the archive "
729 uint64_t
Offset = Data.data() - Parent->getData().data();
736 Child Ret(Parent, NextLoc, &Err);
738 return std::move(Err);
743 const char *a = Parent->Data.getBuffer().data();
744 const char *c = Data.data();
745 uint64_t offset = c - a;
753 uint64_t RawSize = RawSizeOrErr.
get();
755 Header->getName(Header->getSizeOf() + RawSize);
781 return std::move(*BinaryOrErr);
782 return BinaryOrErr.takeError();
787 std::unique_ptr<Archive> Ret;
791 Ret = std::make_unique<BigArchive>(Source, Err);
793 Ret = std::make_unique<ZOSArchive>(Source, Err);
795 Ret = std::make_unique<Archive>(Source, Err);
798 return std::move(Err);
799 return std::move(Ret);
802std::unique_ptr<AbstractArchiveMemberHeader>
808 return std::make_unique<ZOSArchiveMemberHeader>(
this, RawHeaderPtr,
Size,
811 return std::make_unique<ArchiveMemberHeader>(
this, RawHeaderPtr,
Size, Err);
812 return std::make_unique<BigArchiveMemberHeader>(
this, RawHeaderPtr,
Size,
827 FirstRegularData =
C.Data;
828 FirstRegularStartOfFile =
C.StartOfFile;
908 if (Name ==
"__.SYMDEF" || Name ==
"__.SYMDEF_64") {
909 if (Name ==
"__.SYMDEF")
929 if (Name.starts_with(
"#1/")) {
937 Name = NameOrErr.
get();
938 if (Name ==
"__.SYMDEF SORTED" || Name ==
"__.SYMDEF") {
949 }
else if (Name ==
"__.SYMDEF_64 SORTED" || Name ==
"__.SYMDEF_64") {
971 bool has64SymTable =
false;
972 if (Name ==
"/" || Name ==
"/SYM64/") {
981 if (Name ==
"/SYM64/")
982 has64SymTable =
true;
995 Name = NameOrErr.
get();
1015 if (Name[0] !=
'/') {
1046 NameOrErr =
C->getRawName();
1051 Name = NameOrErr.
get();
1071 NameOrErr =
C->getRawName();
1076 Name = NameOrErr.
get();
1079 if (Name ==
"/<ECSYMBOLS>/") {
1103 if (
T.isOSWindows())
1116 bool SkipInternal)
const {
1122 Child(
this, FirstRegularData, FirstRegularStartOfFile), Err);
1138 uint32_t SymbolCount = Parent->getNumberOfSymbols();
1139 return SymbolCount <= SymbolIndex &&
1140 SymbolIndex < SymbolCount + Parent->getNumberOfECSymbols();
1144 assert(Parent->kind() ==
K_ZOS &&
"Cannot get z/OS attributes for non-z/OS "
1146 if (SymbolIndex >= Parent->getNumberOfSymbols())
1151 const char *Buf = Parent->getSymbolTable().begin();
1157 return Parent->ECSymbolTable.
begin() + StringIndex;
1158 return Parent->getSymbolTable().begin() + StringIndex;
1162 const char *Buf = Parent->getSymbolTable().begin();
1163 const char *Offsets = Buf;
1166 Offsets +=
sizeof(uint64_t);
1170 if (Parent->kind() ==
K_GNU) {
1174 }
else if (Parent->kind() ==
K_BSD) {
1190 }
else if (Parent->kind() ==
K_ZOS) {
1199 Buf += MemberCount * 4 + 4;
1203 if (SymbolIndex < SymbolCount) {
1205 const char *Indices = Buf + 4;
1209 OffsetIndex =
read16le(Indices + SymbolIndex * 2);
1212 const char *Indices = Parent->ECSymbolTable.begin() + 4;
1216 OffsetIndex =
read16le(Indices + (SymbolIndex - SymbolCount) * 2);
1223 if (OffsetIndex >= MemberCount)
1229 const char *
Loc = Parent->getData().begin() +
Offset;
1233 return std::move(Err);
1239 if (Parent->kind() ==
K_BSD) {
1253 const char *Buf = Parent->getSymbolTable().begin();
1259 if (t.SymbolIndex + 1 < RanlibCount) {
1260 const char *Ranlibs = Buf + 4;
1263 CurRanStrx =
read32le(Ranlibs + t.SymbolIndex * 8);
1264 NextRanStrx =
read32le(Ranlibs + (t.SymbolIndex + 1) * 8);
1265 t.StringIndex -= CurRanStrx;
1266 t.StringIndex += NextRanStrx;
1270 t.StringIndex = Parent->ECSymbolTable.find(
'\0', t.StringIndex) + 1;
1273 t.StringIndex = Parent->getSymbolTable().find(
'\0', t.StringIndex) + 1;
1289 uint64_t symbol_count =
read64be(buf);
1290 buf +=
sizeof(uint64_t) + (symbol_count * (
sizeof(uint64_t)));
1300 const char *ranlibs = buf + 4;
1314 uint64_t ranlib_count = 0;
1316 const char *ranlibs = buf + 8;
1317 uint64_t ran_strx = 0;
1319 buf +=
sizeof(uint64_t) + (ranlib_count * (2 * (
sizeof(uint64_t))));
1321 buf +=
sizeof(uint64_t);
1333 buf +=
sizeof(
uint32_t) + (SymbolCount * (
sizeof(uint64_t)));
1338 buf += 4 + (member_count * 4);
1340 buf += 4 + (symbol_count * 2);
1367 Twine(StringIndex));
1376 if (Index > MemberCount)
1378 " is larger than member count " +
1379 Twine(MemberCount));
1383 return malformedError(
"malformed EC symbol names: not null-terminated");
1411 buf += 4 + (member_count * 4);
1425 for (; bs != es; ++bs) {
1427 if (SymName ==
name) {
1429 return Child(*MemberOrErr);
1431 return MemberOrErr.takeError();
1434 return std::nullopt;
1446 const char *&GlobalSymtabLoc,
1449 uint64_t GlobalSymtabContentOffset =
1451 if (GlobalSymtabContentOffset > BufferSize)
1453 Twine(BitMessage) +
" global symbol table header at offset 0x" +
1456 " goes past the end of file");
1458 GlobalSymtabLoc =
Data.getBufferStart() + GlobalSymtabOffset;
1464 RawOffset +
"\" is not a number");
1466 if (GlobalSymtabContentOffset +
Size > BufferSize)
1468 Twine(BitMessage) +
" global symbol table content at offset 0x" +
1496 unsigned SymOffsetsSize = 8 * (SymNum + 1);
1497 uint64_t SymbolTableStringSize =
Size - SymOffsetsSize;
1508 uint64_t BufferSize =
Data.getBufferSize();
1511 Err =
malformedError(
"malformed AIX big archive: incomplete fixed length "
1512 "header, the archive is only" +
1513 Twine(BufferSize) +
" byte(s)");
1520 Err =
malformedError(
"malformed AIX big archive: first member offset \"" +
1521 RawOffset +
"\" is not a number");
1526 Err =
malformedError(
"malformed AIX big archive: last member offset \"" +
1527 RawOffset +
"\" is not a number");
1529 uint64_t GlobSymtab32Offset = 0;
1533 "offset of 32-bit members \"" +
1534 RawOffset +
"\" is not a number");
1538 uint64_t GlobSymtab64Offset = 0;
1542 "offset of 64-bit members\"" +
1543 RawOffset +
"\" is not a number");
1547 const char *GlobSymtab32Loc =
nullptr;
1548 const char *GlobSymtab64Loc =
nullptr;
1549 uint64_t GlobSymtab32Size = 0;
1550 uint64_t GlobSymtab64Size = 0;
1553 if (GlobSymtab32Offset) {
1556 GlobSymtab32Loc, GlobSymtab32Size,
"32-bit");
1563 if (GlobSymtab64Offset) {
1566 GlobSymtab64Loc, GlobSymtab64Size,
"64-bit");
1575 if (GlobSymtab32Offset)
1577 if (GlobSymtab64Offset)
1580 if (SymtabInfos.
size() == 1) {
1583 }
else if (SymtabInfos.
size() == 2) {
1587 uint64_t SymNum = SymtabInfos[0].SymNum + SymtabInfos[1].SymNum;
1590 Out << SymtabInfos[0].SymbolOffsetTable;
1591 Out << SymtabInfos[1].SymbolOffsetTable;
1593 Out << SymtabInfos[0].StringTable;
1594 Out << SymtabInfos[1].StringTable;
1598 SymtabInfos[0].StringTable.
size() +
1599 SymtabInfos[1].StringTable.
size());
1638 if (Name ==
"__.SYMDEF") {
1646 "z/OS archive symbol table is too small to read the symbol count, "
1647 "symbol table size is " +
1651 uint64_t EbcdicSymbolCount =
read32be(EbcdicSymbolTable.
data());
1652 uint64_t OffsetToEbcdicNames =
1653 sizeof(
uint32_t) + (EbcdicSymbolCount * (
sizeof(uint64_t)));
1654 if (OffsetToEbcdicNames > EbcdicSymbolTable.
size()) {
1656 Twine(OffsetToEbcdicNames) +
1657 " exceeds symbol table size " +
1661 uint64_t EbcdicNamesSize = EbcdicSymbolTable.
size() - OffsetToEbcdicNames;
1662 const char *EbcdicNamesPtr = EbcdicSymbolTable.
data() + OffsetToEbcdicNames;
1663 StringRef EbcdicNames(EbcdicNamesPtr, EbcdicNamesSize);
1667 SymbolTableBuf.append(EbcdicSymbolTable.
data(), OffsetToEbcdicNames);
1668 SymbolTableBuf.append(Dst.str());
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
static GCRegistry::Add< ShadowStackGC > C("shadow-stack", "Very portable GC for uncooperative code generators")
This file provides utility functions for converting between EBCDIC-1047 and UTF-8.
Provides ErrorOr<T> smart pointer.
#define offsetof(TYPE, MEMBER)
std::string ebcdicFieldToASCII(const char(&Field)[N])
static void appendGlobalSymbolTableInfo(SmallVector< GlobalSymtabInfo > &SymtabInfos, const char *GlobalSymtabLoc, uint64_t Size)
static Error getGlobalSymtabLocAndSize(const MemoryBufferRef &Data, uint64_t GlobalSymtabOffset, const char *&GlobalSymtabLoc, uint64_t &Size, const char *BitMessage)
static Error malformedError(Twine Msg)
StringRef getFieldRawString(const T(&Field)[N])
Expected< uint64_t > getArchiveMemberOctField(Twine FieldName, const StringRef RawField, const Archive *Parent, const AbstractArchiveMemberHeader *MemHeader)
Expected< uint64_t > getArchiveMemberDecField(Twine FieldName, const StringRef RawField, const Archive *Parent, const AbstractArchiveMemberHeader *MemHeader)
static Error createMemberHeaderParseError(const AbstractArchiveMemberHeader *ArMemHeader, const char *RawHeaderPtr, uint64_t Size)
OptimizedStructLayoutField Field
static StringRef getName(Value *V)
This file defines the SmallString class.
static unsigned getSize(unsigned Kind)
Helper for Errors used as out-parameters.
Represents either an error or a value T.
std::error_code getError() const
Lightweight error class with error context and mandatory checking.
static ErrorSuccess success()
Create a success value.
Tagged union holding either a T or a Error.
Error takeError()
Take ownership of the stored error.
reference get()
Returns a reference to the stored T value.
This is an important class for using LLVM in a threaded context.
static ErrorOr< std::unique_ptr< MemoryBuffer > > getFile(const Twine &Filename, bool IsText=false, bool RequiresNullTerminator=true, bool IsVolatile=false, std::optional< Align > Alignment=std::nullopt)
Open the specified file as a MemoryBuffer, returning a new MemoryBuffer if successful,...
SmallString - A SmallString is just a SmallVector with methods and accessors that make it work better...
void push_back(const T &Elt)
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
Represent a constant reference to a string, i.e.
static constexpr size_t npos
bool getAsInteger(unsigned Radix, T &Result) const
Parse the current string as an integer of the specified radix.
bool starts_with(StringRef Prefix) const
Check if this string starts with the given Prefix.
constexpr bool empty() const
Check if the string is empty.
constexpr size_t size() const
Get the string size.
constexpr const char * data() const
Get a pointer to the start of the string (which may not be null terminated).
StringRef rtrim(char Char) const
Return string with consecutive Char characters starting from the right removed.
size_t find(char C, size_t From=0) const
Search for the first character C in the string.
bool ends_with(StringRef Suffix) const
Check if this string ends with the given Suffix.
A table of densely packed, null-terminated strings indexed by offset.
Triple - Helper class for working with autoconf configuration names.
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
static Twine utohexstr(uint64_t Val)
LLVM Value Representation.
static fallible_iterator end(ChildFallibleIterator I)
static fallible_iterator itr(ChildFallibleIterator I, Error &Err)
LLVM_ABI Expected< StringRef > getBuffer() const
LLVM_ABI Expected< Child > getNext() const
LLVM_ABI Expected< std::string > getFullName() const
LLVM_ABI uint64_t getChildOffset() const
LLVM_ABI Expected< uint64_t > getRawSize() const
LLVM_ABI Expected< StringRef > getName() const
LLVM_ABI Expected< uint64_t > getSize() const
Expected< StringRef > getRawName() const
LLVM_ABI Expected< std::unique_ptr< Binary > > getAsBinary(LLVMContext *Context=nullptr) const
LLVM_ABI Expected< MemoryBufferRef > getMemoryBufferRef() const
LLVM_ABI Child(const Archive *Parent, const char *Start, Error *Err)
LLVM_ABI Symbol getNext() const
Symbol(const Archive *p, uint32_t symi, uint32_t stri)
LLVM_ABI Expected< Child > getMember() const
LLVM_ABI StringRef getName() const
LLVM_ABI uint32_t getZOSAttributes() const
For K_ZOS archives, returns the 32-bit attribute word stored alongside the symbol table entry.
LLVM_ABI bool isECSymbol() const
std::unique_ptr< AbstractArchiveMemberHeader > createArchiveMemberHeader(const char *RawHeaderPtr, uint64_t Size, Error *Err) const
symbol_iterator symbol_begin() const
virtual uint64_t getFirstChildOffset() const
StringRef getStringTable() const
uint32_t getNumberOfSymbols() const
fallible_iterator< ChildFallibleIterator > child_iterator
uint32_t getNumberOfECSymbols() const
void setFirstRegular(const Child &C)
uint64_t getArchiveMagicLen() const
StringRef getSymbolTable() const
symbol_iterator symbol_end() const
static object::Archive::Kind getDefaultKind()
virtual bool isEmpty() const
child_iterator child_end() const
bool hasSymbolTable() const
Archive(MemoryBufferRef Source, Error &Err)
static object::Archive::Kind getDefaultKindForTriple(const Triple &T)
Expected< iterator_range< symbol_iterator > > ec_symbols() const
Expected< std::optional< Child > > findSym(StringRef name) const
child_iterator child_begin(Error &Err, bool SkipInternal=true) const
static Expected< std::unique_ptr< Archive > > create(MemoryBufferRef Source)
bool Has32BitGlobalSymtab
std::string MergedGlobalSymtabBuf
bool Has64BitGlobalSymtab
const FixLenHdr * ArFixLenHdr
uint64_t FirstChildOffset
LLVM_ABI BigArchive(MemoryBufferRef Source, Error &Err)
StringRef getData() const
Binary(unsigned int Type, MemoryBufferRef Source)
MemoryBufferRef getMemoryBufferRef() const
LLVM_ABI ZOSArchive(MemoryBufferRef Source, Error &Err)
raw_ostream & write_escaped(StringRef Str, bool UseHexEscapes=false)
Output Str, turning '\', '\t', ' ', '"', and anything that doesn't satisfy llvm::isPrint into an esca...
A raw_ostream that writes to an std::string.
LLVM_ABI void convertToUTF8(StringRef Source, SmallVectorImpl< char > &Result)
constexpr size_t NameSize
const char ArchiveMagic[]
const char ZOSArchiveMagic[]
const char ThinArchiveMagic[]
const char BigArchiveMagic[]
LLVM_ABI Expected< std::unique_ptr< Binary > > createBinary(MemoryBufferRef Source, LLVMContext *Context=nullptr, bool InitContent=true)
Create a Binary from Source, autodetecting the file type.
uint64_t read64le(const void *P)
uint16_t read16le(const void *P)
uint64_t read64be(const void *P)
uint32_t read32be(const void *P)
uint32_t read32le(const void *P)
LLVM_ABI StringRef parent_path(StringRef path LLVM_LIFETIME_BOUND, Style style=Style::native)
Get parent path.
LLVM_ABI bool is_absolute(const Twine &path, Style style=Style::native)
Is path absolute?
LLVM_ABI void append(SmallVectorImpl< char > &path, const Twine &a, const Twine &b="", const Twine &c="", const Twine &d="")
Append to path.
LLVM_ABI std::string getDefaultTargetTriple()
getDefaultTargetTriple() - Return the default target triple the compiler has been configured to produ...
TimePoint< std::chrono::seconds > toTimePoint(std::time_t T)
Convert a std::time_t to a TimePoint.
This is an optimization pass for GlobalISel generic memory operations.
Error createFileError(const Twine &F, Error E)
Concatenate a source file path and/or name with an Error.
iterator_range< T > make_range(T x, T y)
Convenience function for iterating over sub-ranges.
constexpr uint64_t alignTo(uint64_t Size, Align A)
Returns a multiple of A needed to store Size bytes.
Error make_error(ArgTs &&... Args)
Make a Error instance representing failure using the given error info type.
void cantFail(Error Err, const char *Msg=nullptr)
Report a fatal error if Err is a failure value.
RelativeUniformCounterPtr ValuesPtrExpr VTableAddr Count
LLVM_ABI Error errorCodeToError(std::error_code EC)
Helper for converting an std::error_code to a Error.
@ Increment
Incrementally increasing token ID.
void consumeError(Error Err)
Consume a Error without doing anything.
LLVM_ABI Error write(DWPWriter &Out, ArrayRef< std::string > Inputs, OnCuIndexOverflow OverflowOptValue, Dwarf64StrOffsetsPromotion StrOffsetsOptValue, raw_pwrite_stream *OS=nullptr)
StringRef SymbolOffsetTable