29 #ifndef LLVM_INCLUDE_LLVM_OBJECT_RESFILE_H 30 #define LLVM_INCLUDE_LLVM_OBJECT_RESFILE_H 48 class WindowsResource;
96 Error moveNext(
bool &End);
162 template <
typename T>
163 using Children = std::map<T, std::unique_ptr<TreeNode>>;
175 return StringChildren;
184 static std::unique_ptr<TreeNode> createStringNode();
185 static std::unique_ptr<TreeNode> createIDNode();
186 static std::unique_ptr<TreeNode> createDataNode(uint16_t MajorVersion,
187 uint16_t MinorVersion,
190 explicit TreeNode(
bool IsStringNode);
191 TreeNode(uint16_t MajorVersion, uint16_t MinorVersion,
195 bool &IsNewNameString);
200 uint16_t MajorVersion = 0, uint16_t MinorVersion = 0,
204 bool IsDataNode =
false;
209 uint16_t MajorVersion = 0;
210 uint16_t MinorVersion = 0;
216 std::vector<std::vector<uint8_t>>
Data;
217 std::vector<std::vector<UTF16>> StringTable;
const size_t WIN_RES_NULL_ENTRY_SIZE
Type
MessagePack types as defined in the standard, with the exception of Integer being divided into a sign...
An implementation of BinaryStream which holds its entire data set in a single contiguous buffer...
This class represents lattice values for constants.
bool checkNameString() const
support::ulittle16_t NameID
void setName(uint16_t ID)
support::ulittle16_t TypeID
uint16_t getMajorVersion() const
amdgpu Simplify well known AMD library false Value Value const Twine & Name
uint16_t getDataVersion() const
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
std::map< T, std::unique_ptr< TreeNode > > Children
const Children< uint32_t > & getIDChildren() const
Tagged union holding either a T or a Error.
uint32_t getDataIndex() const
uint16_t getNameID() const
static bool classof(const Binary *V)
uint16_t getMemoryFlags() const
uint16_t getMinorVersion() const
uint16_t getMinorVersion() const
uint32_t getCharacteristics() const
The instances of the Type class are immutable: once they are created, they are never changed...
ArrayRef< uint8_t > getData() const
uint32_t getStringIndex() const
ArrayRef< UTF16 > getTypeString() const
static void print(raw_ostream &Out, object::Archive::Kind Kind, T Val)
const uint16_t WIN_RES_PURE_MOVEABLE
llvm::Expected< Value > parse(llvm::StringRef JSON)
Parses the provided JSON source, or returns a ParseError.
const ArrayRef< std::vector< UTF16 > > getStringTable() const
const uint32_t WIN_RES_HEADER_ALIGNMENT
const ArrayRef< std::vector< uint8_t > > getData() const
void setType(uint16_t ID)
bool checkTypeString() const
BinaryStreamRef is to BinaryStream what ArrayRef is to an Array.
uint16_t getMajorVersion() const
const size_t WIN_RES_MAGIC_SIZE
EmptyResError(Twine Msg, object_error ECOverride)
Expected< std::unique_ptr< MemoryBuffer > > writeWindowsResourceCOFF(llvm::COFF::MachineTypes MachineType, const WindowsResourceParser &Parser)
COFFYAML::WeakExternalCharacteristics Characteristics
ArrayRef< UTF16 > getNameString() const
uint16_t getTypeID() const
const uint32_t WIN_RES_DATA_ALIGNMENT
uint16_t getLanguage() const
Lightweight error class with error context and mandatory checking.
This class implements an extremely fast bulk output stream that can only output to a stream...
Provides read only access to a subclass of BinaryStream.
StringRef - Represent a constant reference to a string, i.e.
const TreeNode & getTree() const
uint32_t getCharacteristics() const
bool checkIsDataNode() const
const Children< std::string > & getStringChildren() const