56LLVMSymbolizer::symbolizeCodeCommon(
const T &ModuleSpecifier,
61 return InfoOrErr.takeError();
73 ModuleOffset.
Address +=
Info->getModulePreferredBase();
88 return symbolizeCodeCommon(Obj, ModuleOffset);
94 return symbolizeCodeCommon(
ModuleName, ModuleOffset);
100 return symbolizeCodeCommon(
BuildID, ModuleOffset);
108 return InfoOrErr.takeError();
120 ModuleOffset.
Address +=
Info->getModulePreferredBase();
128 for (
int i = 0, n =
InlinedContext.getNumberOfFrames(); i < n; i++) {
136Expected<DIInliningInfo>
139 return symbolizeInlinedCodeCommon(Obj, ModuleOffset);
145 return symbolizeInlinedCodeCommon(
ModuleName, ModuleOffset);
151 return symbolizeInlinedCodeCommon(
BuildID, ModuleOffset);
156LLVMSymbolizer::symbolizeDataCommon(
const T &ModuleSpecifier,
161 return InfoOrErr.takeError();
173 ModuleOffset.
Address +=
Info->getModulePreferredBase();
184 return symbolizeDataCommon(Obj, ModuleOffset);
190 return symbolizeDataCommon(
ModuleName, ModuleOffset);
196 return symbolizeDataCommon(
BuildID, ModuleOffset);
201LLVMSymbolizer::symbolizeFrameCommon(
const T &ModuleSpecifier,
205 return InfoOrErr.takeError();
211 return std::vector<DILocal>();
217 ModuleOffset.
Address +=
Info->getModulePreferredBase();
219 return Info->symbolizeFrame(ModuleOffset);
225 return symbolizeFrameCommon(Obj, ModuleOffset);
231 return symbolizeFrameCommon(
ModuleName, ModuleOffset);
237 return symbolizeFrameCommon(
BuildID, ModuleOffset);
242LLVMSymbolizer::findSymbolCommon(
const T &ModuleSpecifier,
StringRef Symbol,
246 return InfoOrErr.takeError();
249 std::vector<DILineInfo> Result;
263 Result.push_back(std::move(LineInfo));
270Expected<std::vector<DILineInfo>>
273 return findSymbolCommon(Obj, Symbol,
Offset);
289 ObjectFileCache.clear();
292 BinaryForPath.clear();
293 ObjectPairForPathArch.clear();
295 BuildIDPaths.clear();
304std::string getDarwinDWARFResourceForPath(
const std::string &Path,
305 const std::string &Basename) {
308 ResourceName +=
".dSYM";
312 return std::string(ResourceName);
315bool checkFileCRC(StringRef Path,
uint32_t CRCHash) {
316 ErrorOr<std::unique_ptr<MemoryBuffer>> MB =
323bool getGNUDebuglinkContents(
const ObjectFile *Obj, std::string &DebugName,
332 if (Name ==
"gnu_debuglink") {
333 Expected<StringRef> ContentsOrErr =
Section.getContents();
334 if (!ContentsOrErr) {
338 DataExtractor DE(*ContentsOrErr,
Obj->isLittleEndian(), 0);
340 if (
const char *DebugNameStr = DE.getCStr(&
Offset)) {
343 if (DE.isValidOffsetForDataOfSize(
Offset, 4)) {
344 DebugName = DebugNameStr;
345 CRCHash = DE.getU32(&
Offset);
357 ArrayRef<uint8_t> dbg_uuid = DbgObj->getUuid();
358 ArrayRef<uint8_t> bin_uuid =
Obj->getUuid();
359 if (dbg_uuid.empty() || bin_uuid.empty())
361 return !
memcmp(dbg_uuid.data(), bin_uuid.data(), dbg_uuid.size());
366ObjectFile *LLVMSymbolizer::lookUpDsymFile(
const std::string &ExePath,
368 const std::string &ArchName) {
371 std::vector<std::string> DsymPaths;
374 getDarwinDWARFResourceForPath(ExePath, std::string(Filename)));
375 for (
const auto &Path : Opts.DsymHints) {
377 getDarwinDWARFResourceForPath(Path, std::string(Filename)));
379 for (
const auto &Path : DsymPaths) {
380 auto DbgObjOrErr = getOrCreateObject(Path, ArchName);
392 if (darwinDsymMatchesBinary(MachDbgObj, MachExeObj))
398ObjectFile *LLVMSymbolizer::lookUpDebuglinkObject(
const std::string &Path,
400 const std::string &ArchName) {
401 std::string DebuglinkName;
403 std::string DebugBinaryPath;
404 if (!getGNUDebuglinkContents(Obj, DebuglinkName, CRCHash))
406 if (!findDebugBinary(Path, DebuglinkName, CRCHash, DebugBinaryPath))
408 auto DbgObjOrErr = getOrCreateObject(DebugBinaryPath, ArchName);
414 return DbgObjOrErr.get();
417ObjectFile *LLVMSymbolizer::lookUpBuildIDObject(
const std::string &Path,
419 const std::string &ArchName) {
423 std::string DebugBinaryPath;
424 if (!getOrFindDebugBinary(
BuildID, DebugBinaryPath))
426 auto DbgObjOrErr = getOrCreateObject(DebugBinaryPath, ArchName);
431 return DbgObjOrErr.get();
434bool LLVMSymbolizer::findDebugBinary(
const std::string &OrigPath,
435 const std::string &DebuglinkName,
436 uint32_t CRCHash, std::string &Result) {
437 SmallString<16> OrigDir(OrigPath);
439 SmallString<16> DebugPath = OrigDir;
442 if (checkFileCRC(DebugPath, CRCHash)) {
443 Result = std::string(DebugPath);
449 if (checkFileCRC(DebugPath, CRCHash)) {
450 Result = std::string(DebugPath);
457 if (!Opts.FallbackDebugPath.empty()) {
459 DebugPath = Opts.FallbackDebugPath;
461#if defined(__NetBSD__)
463 DebugPath =
"/usr/libdata/debug";
466 DebugPath =
"/usr/lib/debug";
471 if (checkFileCRC(DebugPath, CRCHash)) {
472 Result = std::string(DebugPath);
484 std::string &Result) {
486 auto I = BuildIDPaths.
find(BuildIDStr);
487 if (
I != BuildIDPaths.
end()) {
493 if (std::optional<std::string> Path = BIDFetcher->fetch(
BuildID)) {
495 auto InsertResult = BuildIDPaths.
insert({BuildIDStr, Result});
496 assert(InsertResult.second);
504std::string LLVMSymbolizer::lookUpGsymFile(
const std::string &Path) {
505 if (Opts.DisableGsym)
508 auto CheckGsymFile = [](
const llvm::StringRef &GsymPath) {
509 sys::fs::file_status Status;
515 if (
const auto GsymPath = Path +
".gsym"; CheckGsymFile(GsymPath))
520 for (
const auto &Directory : Opts.GsymFileDirectory) {
521 SmallString<16> GsymPath = llvm::StringRef{Directory};
525 if (CheckGsymFile(GsymPath))
526 return static_cast<std::string
>(GsymPath);
532Expected<LLVMSymbolizer::ObjectPair>
533LLVMSymbolizer::getOrCreateObjectPair(
const std::string &Path,
534 const std::string &ArchName) {
535 auto I = ObjectPairForPathArch.find(std::make_pair(Path, ArchName));
536 if (
I != ObjectPairForPathArch.end()) {
537 recordAccess(BinaryForPath.find(Path)->second);
541 auto ObjOrErr = getOrCreateObject(Path, ArchName);
543 ObjectPairForPathArch.emplace(std::make_pair(Path, ArchName),
544 ObjectPair(
nullptr,
nullptr));
545 return ObjOrErr.takeError();
553 DbgObj = lookUpDsymFile(Path, MachObj, ArchName);
555 DbgObj = lookUpBuildIDObject(Path, ELFObj, ArchName);
557 DbgObj = lookUpDebuglinkObject(Path, Obj, ArchName);
560 ObjectPair Res = std::make_pair(Obj, DbgObj);
562 ObjectPairForPathArch.emplace(std::make_pair(Path, ArchName), Res);
563 std::string FullDbgObjKey;
564 auto It = ObjectToArchivePath.find(DbgObj);
565 if (It != ObjectToArchivePath.end()) {
566 StringRef ArchivePath = It->second;
568 FullDbgObjKey = (ArchivePath +
"(" + MemberName +
")").str();
570 FullDbgObjKey = DbgObj->getFileName().str();
572 BinaryForPath.find(FullDbgObjKey)
573 ->second.pushEvictor(
574 [
this,
I = Pair.first]() { ObjectPairForPathArch.erase(I); });
578Expected<object::Binary *>
579LLVMSymbolizer::loadOrGetBinary(
const std::string &ArchivePathKey,
580 std::optional<StringRef> FullPathKey) {
582 std::string FullPathKeyStr =
583 FullPathKey ? FullPathKey->str() : ArchivePathKey;
584 auto Pair = BinaryForPath.emplace(FullPathKeyStr, OwningBinary<Binary>());
586 recordAccess(Pair.first->second);
587 return Pair.first->second->getBinary();
590 Expected<OwningBinary<Binary>> BinOrErr =
createBinary(ArchivePathKey);
592 return BinOrErr.takeError();
594 CachedBinary &CachedBin = Pair.first->second;
595 CachedBin = std::move(*BinOrErr);
596 CachedBin.pushEvictor([
this,
I = Pair.first]() { BinaryForPath.erase(I); });
597 LRUBinaries.push_back(CachedBin);
598 CacheSize += CachedBin.size();
599 return CachedBin->getBinary();
602Expected<ObjectFile *> LLVMSymbolizer::findOrCacheObject(
603 const ContainerCacheKey &
Key,
604 llvm::function_ref<Expected<std::unique_ptr<ObjectFile>>()> Loader,
605 const std::string &PathForBinaryCache) {
606 auto It = ObjectFileCache.find(
Key);
607 if (It != ObjectFileCache.end())
608 return It->second.get();
610 Expected<std::unique_ptr<ObjectFile>> ObjOrErr = Loader();
612 ObjectFileCache.emplace(
Key, std::unique_ptr<ObjectFile>());
613 return ObjOrErr.takeError();
617 auto NewEntry = ObjectFileCache.emplace(
Key, std::move(*ObjOrErr));
618 auto CacheIter = BinaryForPath.find(PathForBinaryCache);
619 if (CacheIter != BinaryForPath.end())
620 CacheIter->second.pushEvictor(
621 [
this, Iter = NewEntry.first]() { ObjectFileCache.erase(Iter); });
625Expected<ObjectFile *> LLVMSymbolizer::getOrCreateObjectFromArchive(
626 StringRef ArchivePath, StringRef MemberName, StringRef ArchName,
627 StringRef FullPath) {
628 Expected<object::Binary *> BinOrErr =
629 loadOrGetBinary(ArchivePath.str(), FullPath);
631 return BinOrErr.takeError();
632 object::Binary *
Bin = *BinOrErr;
637 "'%s' is not a valid archive",
638 ArchivePath.str().c_str());
641 for (
auto &Child :
Archive->children(Err,
true)) {
642 Expected<StringRef> NameOrErr = Child.getName();
649 if (*NameOrErr == MemberName) {
650 Expected<std::unique_ptr<object::Binary>> MemberOrErr =
659 std::unique_ptr<object::Binary>
Binary = std::move(*MemberOrErr);
661 ObjectToArchivePath[
Obj] = ArchivePath.str();
663 Triple RequestedTriple;
665 if (ObjArch != RequestedTriple.getArch())
668 ContainerCacheKey CacheKey{ArchivePath.str(), MemberName.str(),
670 Expected<ObjectFile *> Res = findOrCacheObject(
672 [O = std::unique_ptr<ObjectFile>(
673 Obj)]()
mutable -> Expected<std::unique_ptr<ObjectFile>> {
683 return std::move(Err);
685 "no matching member '%s' with arch '%s' in '%s'",
686 MemberName.str().c_str(), ArchName.str().c_str(),
687 ArchivePath.str().c_str());
690Expected<ObjectFile *>
691LLVMSymbolizer::getOrCreateObject(
const std::string &Path,
692 const std::string &ArchName) {
695 if (!
Path.empty() &&
Path.back() ==
')') {
696 size_t OpenParen =
Path.rfind(
'(',
Path.size() - 1);
697 if (OpenParen != std::string::npos) {
698 StringRef ArchivePath = StringRef(Path).substr(0, OpenParen);
699 StringRef MemberName =
700 StringRef(Path).substr(OpenParen + 1,
Path.size() - OpenParen - 2);
701 return getOrCreateObjectFromArchive(ArchivePath, MemberName, ArchName,
706 Expected<object::Binary *> BinOrErr = loadOrGetBinary(Path);
708 return BinOrErr.takeError();
709 object::Binary *
Bin = *BinOrErr;
712 ContainerCacheKey CacheKey{
Path,
"", ArchName};
713 return findOrCacheObject(
715 [UB, ArchName]() -> Expected<std::unique_ptr<ObjectFile>> {
716 return UB->getMachOObjectForArch(ArchName);
720 if (
Bin->isObject()) {
726Expected<SymbolizableModule *>
727LLVMSymbolizer::createModuleInfo(
const ObjectFile *Obj,
728 std::unique_ptr<DIContext>
Context,
729 StringRef ModuleName) {
731 Opts.UntagAddresses);
732 std::unique_ptr<SymbolizableModule> SymMod;
734 SymMod = std::move(*InfoOrErr);
735 auto InsertResult = Modules.insert(
736 std::make_pair(std::string(ModuleName), std::move(SymMod)));
737 assert(InsertResult.second);
739 return InfoOrErr.takeError();
740 return InsertResult.first->second.get();
743Expected<SymbolizableModule *>
747 size_t ColonPos =
ModuleName.find_last_of(
':');
749 if (ColonPos != std::string::npos) {
758 if (
I != Modules.end()) {
759 recordAccess(BinaryForPath.find(BinaryName)->second);
760 return I->second.get();
764 getOrCreateObjectPair(std::string{BinaryName}, std::string{ArchName});
767 Modules.emplace(
ModuleName, std::unique_ptr<SymbolizableModule>());
768 return ObjectsOrErr.takeError();
770 ObjectPair Objects = ObjectsOrErr.get();
772 std::unique_ptr<DIContext> Context;
780 const auto GsymFile = lookUpGsymFile(BinaryName.
str());
781 if (!GsymFile.empty()) {
785 std::unique_ptr<gsym::GsymReader> Reader =
786 std::make_unique<gsym::GsymReader>(std::move(*ReaderOrErr));
788 Context = std::make_unique<gsym::GsymContext>(std::move(Reader));
795 auto EC = CoffObject->getDebugPDBInfo(
DebugInfo, PDBFileName);
798 Objects.first->sections(), [](
SectionRef Section) ->
bool {
799 if (Expected<StringRef> SectionName = Section.getName())
800 return SectionName.get() ==
".debug_info";
803 if (!EC && !HasDwarf &&
DebugInfo !=
nullptr && !PDBFileName.
empty()) {
805 std::unique_ptr<IPDBSession> Session;
807 PDB_ReaderType ReaderType =
808 Opts.UseDIA ? PDB_ReaderType::DIA : PDB_ReaderType::Native;
809 if (
auto Err = loadDataForEXE(ReaderType, Objects.first->getFileName(),
811 Modules.emplace(
ModuleName, std::unique_ptr<SymbolizableModule>());
815 Context.reset(
new PDBContext(*CoffObject, std::move(Session)));
822 nullptr, Opts.DWPName);
824 createModuleInfo(Objects.first, std::move(Context),
ModuleName);
827 BinaryForPath.find(BinaryName)->second.pushEvictor([
this,
I]() {
837 return Obj.makeTriple().isBPF() && !Obj.hasDebugInfo() &&
844 auto I = Modules.find(ObjName);
845 if (
I != Modules.end())
846 return I->second.get();
848 std::unique_ptr<DIContext> Context;
854 return createModuleInfo(&Obj, std::move(Context), ObjName);
857Expected<SymbolizableModule *>
860 if (!getOrFindDebugBinary(
BuildID, Path)) {
862 "could not find build ID");
875StringRef demanglePE32ExternCFunc(StringRef SymbolName) {
879 bool HasAtNumSuffix =
false;
885 HasAtNumSuffix =
true;
890 bool IsVectorCall =
false;
891 if (HasAtNumSuffix &&
SymbolName.ends_with(
"@")) {
897 if (!IsVectorCall && (Front ==
'_' || Front ==
'@'))
912 if (Name.starts_with(
'?')) {
916 Name,
nullptr, &status,
920 return std::string{Name};
921 Result = DemangledName;
926 if (DbiModuleDescriptor && DbiModuleDescriptor->
isWin32Module()) {
927 std::string DemangledCName(demanglePE32ExternCFunc(Name));
932 return DemangledCName;
934 return std::string{Name};
938 if (
Bin->getBinary())
939 LRUBinaries.splice(LRUBinaries.end(), LRUBinaries,
Bin.getIterator());
946 while (CacheSize > Opts.MaxCacheSize && !LRUBinaries.empty() &&
947 std::next(LRUBinaries.begin()) != LRUBinaries.end()) {
949 CacheSize -=
Bin.size();
950 LRUBinaries.pop_front();
957 this->Evictor = [OldEvictor = std::move(this->Evictor),
958 NewEvictor = std::move(NewEvictor)]() {
963 this->Evictor = std::move(NewEvictor);
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
This file declares a library for handling Build IDs and using them to find debug info.
static GCRegistry::Add< ErlangGC > A("erlang", "erlang-compatible garbage collector")
Analysis containing CSE Info
Merge contiguous icmps into a memcmp
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
static std::unique_ptr< BTFContext > create(const object::ObjectFile &Obj, std::function< void(Error)> ErrorHandler=WithColor::defaultErrorHandler)
static LLVM_ABI bool hasBTFSections(const ObjectFile &Obj)
A format-neutral container for inlined code description.
static std::unique_ptr< DWARFContext > create(const object::ObjectFile &Obj, ProcessDebugRelocations RelocAction=ProcessDebugRelocations::Process, const LoadedObjectInfo *L=nullptr, std::string DWPName="", std::function< void(Error)> RecoverableErrorHandler=WithColor::defaultErrorHandler, std::function< void(Error)> WarningHandler=WithColor::defaultWarningHandler, bool ThreadSafe=false)
static ErrorSuccess success()
Create a success value.
Tagged union holding either a T or a Error.
static ErrorOr< std::unique_ptr< MemoryBuffer > > getFileOrSTDIN(const Twine &Filename, bool IsText=false, bool RequiresNullTerminator=true, std::optional< Align > Alignment=std::nullopt)
Open the specified file as a MemoryBuffer, or open stdin if the Filename is "-".
SmallString - A SmallString is just a SmallVector with methods and accessors that make it work better...
iterator find(StringRef Key)
bool insert(MapEntryTy *KeyValue)
insert - Insert the specified key/value pair into the map.
StringRef - Represent a constant reference to a string, i.e.
static constexpr size_t npos
std::string str() const
str - Get the contents as an std::string.
constexpr bool empty() const
empty - Check if the string is empty.
Triple - Helper class for working with autoconf configuration names.
static LLVM_ABI ArchType getArchTypeForLLVMName(StringRef Str)
The canonical type for the given LLVM architecture name (e.g., "x86").
static LLVM_ABI llvm::Expected< GsymReader > openFile(StringRef Path)
Construct a GsymReader from a file on disk.
BuildIDFetcher searches local cache directories for debug info.
This class is the base class for all object file types.
This is a value type class that represents a single section in the list of sections in the object fil...
LLVM_ABI void pushEvictor(std::function< void()> Evictor)
static LLVM_ABI std::string DemangleName(StringRef Name, const SymbolizableModule *DbiModuleDescriptor)
LLVM_ABI void pruneCache()
LLVM_ABI Expected< std::vector< DILineInfo > > findSymbol(const ObjectFile &Obj, StringRef Symbol, uint64_t Offset)
LLVM_ABI Expected< DIInliningInfo > symbolizeInlinedCode(const ObjectFile &Obj, object::SectionedAddress ModuleOffset)
LLVM_ABI LLVMSymbolizer()
LLVM_ABI Expected< DILineInfo > symbolizeCode(const ObjectFile &Obj, object::SectionedAddress ModuleOffset)
LLVM_ABI Expected< DIGlobal > symbolizeData(const ObjectFile &Obj, object::SectionedAddress ModuleOffset)
LLVM_ABI Expected< std::vector< DILocal > > symbolizeFrame(const ObjectFile &Obj, object::SectionedAddress ModuleOffset)
LLVM_ABI Expected< SymbolizableModule * > getOrCreateModuleInfo(StringRef ModuleName)
Returns a SymbolizableModule or an error if loading debug info failed.
LLVM_ABI ~LLVMSymbolizer()
virtual bool isWin32Module() const =0
static Expected< std::unique_ptr< SymbolizableObjectFile > > create(const object::ObjectFile *Obj, std::unique_ptr< DIContext > DICtx, bool UntagAddresses)
constexpr char SymbolName[]
Key for Kernel::Metadata::mSymbolName.
SmallVector< uint8_t, 10 > BuildID
A build ID in binary form.
LLVM_ABI BuildIDRef getBuildID(const ObjectFile *Obj)
Returns the build ID, if any, contained in the given object file.
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.
static bool useBTFContext(const ObjectFile &Obj)
static StringRef getBuildIDStr(ArrayRef< uint8_t > BuildID)
LLVM_ABI std::error_code make_absolute(SmallVectorImpl< char > &path)
Make path an absolute path.
LLVM_ABI std::error_code status(const Twine &path, file_status &result, bool follow=true)
Get file status as if by POSIX stat().
LLVM_ABI bool is_directory(const basic_file_status &status)
Does status represent a directory?
LLVM_ABI void remove_filename(SmallVectorImpl< char > &path, Style style=Style::native)
Remove the last component from path unless it is the root dir.
LLVM_ABI StringRef filename(StringRef path LLVM_LIFETIME_BOUND, Style style=Style::native)
Get filename.
LLVM_ABI void append(SmallVectorImpl< char > &path, const Twine &a, const Twine &b="", const Twine &c="", const Twine &d="")
Append to path.
LLVM_ABI StringRef extension(StringRef path LLVM_LIFETIME_BOUND, Style style=Style::native)
Get extension.
LLVM_ABI StringRef relative_path(StringRef path LLVM_LIFETIME_BOUND, Style style=Style::native)
Get relative path.
This is an optimization pass for GlobalISel generic memory operations.
auto drop_begin(T &&RangeOrContainer, size_t N=1)
Return a range covering RangeOrContainer with the first N elements excluded.
DEMANGLE_ABI bool nonMicrosoftDemangle(std::string_view MangledName, std::string &Result, bool CanHaveLeadingDot=true, bool ParseParams=true)
Error createFileError(const Twine &F, Error E)
Concatenate a source file path and/or name with an Error.
ArrayRef< CharT > arrayRefFromStringRef(StringRef Input)
Construct a string ref from an array ref of unsigned chars.
decltype(auto) dyn_cast(const From &Val)
dyn_cast<X> - Return the argument parameter cast to the specified type.
auto dyn_cast_if_present(const Y &Val)
dyn_cast_if_present<X> - Functionally identical to dyn_cast, except that a null (or none in the case ...
constexpr bool all_of(R &&range, UnaryPredicate P)
Provide wrappers to std::all_of which take ranges instead of having to pass begin/end explicitly.
Error createStringError(std::error_code EC, char const *Fmt, const Ts &... Vals)
Create formatted StringError object.
@ no_such_file_or_directory
auto dyn_cast_or_null(const Y &Val)
bool isDigit(char C)
Checks if character C is one of the 10 decimal digits.
LLVM_ATTRIBUTE_VISIBILITY_DEFAULT AnalysisKey InnerAnalysisManagerProxy< AnalysisManagerT, IRUnitT, ExtraArgTs... >::Key
@ Global
Append to llvm.global_dtors.
LLVM_ABI uint32_t crc32(ArrayRef< uint8_t > Data)
DEMANGLE_ABI char * microsoftDemangle(std::string_view mangled_name, size_t *n_read, int *status, MSDemangleFlags Flags=MSDF_None)
Demangles the Microsoft symbol pointed at by mangled_name and returns it.
@ MSDF_NoCallingConvention
constexpr bool any_of(R &&range, UnaryPredicate P)
Provide wrappers to std::any_of which take ranges instead of having to pass begin/end explicitly.
decltype(auto) cast(const From &Val)
cast<X> - Return the argument parameter cast to the specified type.
LLVM_ABI Error errorCodeToError(std::error_code EC)
Helper for converting an std::error_code to a Error.
void consumeError(Error Err)
Consume a Error without doing anything.
Implement std::hash so that hash_code can be used in STL containers.
Container for description of a global variable.
Controls which fields of DILineInfo container should be filled with data.
A format-neutral container for source line information.
static constexpr const char *const BadString
FunctionNameKind PrintFunctions
FileLineInfoKind PathStyle