LLVM 17.0.0git
|
#include "TextStubCommon.h"
#include "llvm/ADT/StringSwitch.h"
#include "llvm/Support/JSON.h"
#include <utility>
Go to the source code of this file.
Classes | |
struct | JSONSymbol |
class | JSONStubError |
Namespaces | |
namespace | StubParser |
Typedefs | |
using | AttrToTargets = std::map< std::string, TargetList > |
using | TargetsToSymbols = SmallVector< std::pair< TargetList, std::vector< JSONSymbol > > > |
using | StubParser::IFPtr = std::unique_ptr< InterfaceFile > |
Enumerations | |
enum | TBDKey : size_t { TBDVersion = 0U , MainLibrary , Documents , TargetInfo , Targets , Target , Deployment , Flags , Attributes , InstallName , CurrentVersion , CompatibilityVersion , Version , SwiftABI , ABI , ParentUmbrella , Umbrella , AllowableClients , Clients , ReexportLibs , Names , Name , Exports , Reexports , Undefineds , Data , Text , Weak , ThreadLocal , Globals , ObjCClass , ObjCEHType , ObjCIvar , RPath , Paths } |
Variables | |
std::array< StringRef, 64 > | Keys |
using AttrToTargets = std::map<std::string, TargetList> |
Definition at line 81 of file TextStubV5.cpp.
using TargetsToSymbols = SmallVector<std::pair<TargetList, std::vector<JSONSymbol> >> |
Definition at line 82 of file TextStubV5.cpp.
enum TBDKey : size_t |
Definition at line 85 of file TextStubV5.cpp.
Error collectFromArray | ( | TBDKey | Key, |
const Object * | Obj, | ||
std::function< void(StringRef)> | Append, | ||
bool | IsRequired = false |
||
) |
Definition at line 216 of file TextStubV5.cpp.
References llvm::json::Object::getArray(), getParseErrorMsg(), Keys, and llvm::Error::success().
Referenced by StubParser::collectSymbolsFromSegment(), StubParser::getFlags(), and StubParser::getLibSection().
|
static |
Definition at line 161 of file TextStubV5.cpp.
References Keys.
Referenced by collectFromArray(), StubParser::getFlags(), StubParser::getNameSection(), StubParser::getPackedVersion(), getRequiredValue(), StubParser::getSwiftVersion(), StubParser::getSymbolSection(), StubParser::getTargets(), StubParser::getTargetsSection(), and StubParser::getUmbrellaSection().
Expected< StubT > getRequiredValue | ( | TBDKey | Key, |
const Object * | Obj, | ||
std::function< std::optional< JsonT >(const Object *, StringRef)> | GetValue, | ||
std::function< std::optional< StubT >(JsonT)> | Validate = nullptr |
||
) |
Definition at line 183 of file TextStubV5.cpp.
References getParseErrorMsg(), and Keys.
Expected< StubT > getRequiredValue | ( | TBDKey | Key, |
const Object * | Obj, | ||
std::function< std::optional< JsonT >(const Object *, StringRef)> | GetValue, | ||
StubT | DefaultValue, | ||
std::function< std::optional< StubT >(JsonT)> | Validate | ||
) |
Definition at line 201 of file TextStubV5.cpp.
References getParseErrorMsg(), and Keys.
|
static |
Definition at line 165 of file TextStubV5.cpp.
References Keys.
std::array<StringRef, 64> Keys |
Definition at line 123 of file TextStubV5.cpp.
Referenced by collectFromArray(), StubParser::getFlags(), StubParser::getInlinedLibs(), llvm::MachO::getInterfaceFileFromJSON(), StubParser::getLibSection(), StubParser::getNameSection(), StubParser::getPackedVersion(), getParseErrorMsg(), getRequiredValue(), getSerializeErrorMsg(), StubParser::getSwiftVersion(), StubParser::getSymbolSection(), StubParser::getTargets(), StubParser::getTargetsSection(), StubParser::getUmbrellaSection(), llvm::yaml::MappingTraits< const InterfaceFile * >::mapKeysToValues(), llvm::yaml::MappingTraits< const InterfaceFile * >::mapKeysToValuesV4(), llvm::yaml::MappingTraits< ELFYAML::Symbol >::mapping(), llvm::yaml::MappingTraits< SIArgument >::mapping(), and llvm::vfs::RedirectingFileSystemParser::parse().