LLVM 20.0.0git
Classes | Namespaces | Macros | Functions | Variables
WindowsResource.cpp File Reference
#include "llvm/Object/WindowsResource.h"
#include "llvm/Object/COFF.h"
#include "llvm/Object/WindowsMachineFlag.h"
#include "llvm/Support/FormatVariadic.h"
#include "llvm/Support/MathExtras.h"
#include "llvm/Support/ScopedPrinter.h"
#include <ctime>
#include <queue>

Go to the source code of this file.

Classes

class  llvm::object::WindowsResourceCOFFWriter
 

Namespaces

namespace  llvm
 This is an optimization pass for GlobalISel generic memory operations.
 
namespace  llvm::object
 

Macros

#define RETURN_IF_ERROR(X)
 
#define UNWRAP_REF_OR_RETURN(Name, Expr)
 
#define UNWRAP_OR_RETURN(Name, Expr)
 

Functions

static Error llvm::object::readStringOrId (BinaryStreamReader &Reader, uint16_t &ID, ArrayRef< UTF16 > &Str, bool &IsString)
 
void llvm::object::printResourceTypeName (uint16_t TypeID, raw_ostream &OS)
 
static bool llvm::object::convertUTF16LEToUTF8String (ArrayRef< UTF16 > Src, std::string &Out)
 
static std::string llvm::object::makeDuplicateResourceError (const ResourceEntryRef &Entry, StringRef File1, StringRef File2)
 
static void llvm::object::printStringOrID (const WindowsResourceParser::StringOrID &S, raw_string_ostream &OS, bool IsType, bool IsID)
 
static std::string llvm::object::makeDuplicateResourceError (const std::vector< WindowsResourceParser::StringOrID > &Context, StringRef File1, StringRef File2)
 
static void llvm::object::coffnamecpy (char(&Dest)[COFF::NameSize], StringRef Src)
 
Expected< std::unique_ptr< MemoryBuffer > > llvm::object::writeWindowsResourceCOFF (llvm::COFF::MachineTypes MachineType, const WindowsResourceParser &Parser, uint32_t TimeDateStamp)
 

Variables

const uint32_t llvm::object::MIN_HEADER_SIZE = 7 * sizeof(uint32_t) + 2 * sizeof(uint16_t)
 
const uint32_t llvm::object::SECTION_ALIGNMENT = sizeof(uint64_t)
 

Macro Definition Documentation

◆ RETURN_IF_ERROR

#define RETURN_IF_ERROR (   X)
Value:
if (auto EC = X) \
return EC;
static GCMetadataPrinterRegistry::Add< ErlangGCPrinter > X("erlang", "erlang-compatible garbage collector")

Definition at line 28 of file WindowsResource.cpp.

◆ UNWRAP_OR_RETURN

#define UNWRAP_OR_RETURN (   Name,
  Expr 
)
Value:
auto Name##OrErr = Expr; \
if (!Name##OrErr) \
return Name##OrErr.takeError(); \
auto Name = *Name##OrErr;
std::string Name

Definition at line 38 of file WindowsResource.cpp.

◆ UNWRAP_REF_OR_RETURN

#define UNWRAP_REF_OR_RETURN (   Name,
  Expr 
)
Value:
auto Name##OrErr = Expr; \
if (!Name##OrErr) \
return Name##OrErr.takeError(); \
const auto &Name = *Name##OrErr;

Definition at line 32 of file WindowsResource.cpp.