31 #include <system_error> 46 return make_unique<ELFObjectFile<ELFT>>(std::move(*
Ret));
51 std::pair<unsigned char, unsigned char> Ident =
53 std::size_t MaxAlignment =
61 return createPtr<ELF32LE>(Obj);
63 return createPtr<ELF32BE>(Obj);
68 return createPtr<ELF64LE>(Obj);
70 return createPtr<ELF64BE>(Obj);
bool hasAttribute(unsigned Tag) const
virtual uint16_t getEMachine() const =0
Compute iterated dominance frontiers using a linear time algorithm.
SubtargetFeatures getFeatures() const override
This class is the base class for all object file types.
static Error createError(StringRef Err)
unsigned getAttributeValue(unsigned Tag) const
virtual std::error_code getBuildAttributes(ARMAttributeParser &Attributes) const
void setARMSubArch(Triple &TheTriple) const override
StringRef getBuffer() const
Tagged union holding either a T or a Error.
void AddFeature(StringRef String, bool Enable=true)
Adds Features.
SubArchType getSubArch() const
getSubArch - get the parsed subarchitecture type for this triple.
std::pair< unsigned char, unsigned char > getElfArchType(StringRef Object)
std::size_t countTrailingZeros(T Val, ZeroBehavior ZB=ZB_Width)
Count number of 0's from the least significant bit to the most stopping at the first 1...
The instances of the Type class are immutable: once they are created, they are never changed...
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
static Expected< std::unique_ptr< ObjectFile > > createELFObjectFile(MemoryBufferRef Object)
void setArchName(StringRef Str)
setArchName - Set the architecture (first) component of the triple by name.
static Expected< ELFObjectFile< ELFT > > create(MemoryBufferRef Object)
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
bool isLittleEndian() const
ELFObjectFileBase(unsigned int Type, MemoryBufferRef Source)
Triple - Helper class for working with autoconf configuration names.
virtual unsigned getPlatformFlags() const =0
Returns platform-specific object flags, if any.
Manages the enabling and disabling of subtarget specific features.
SubtargetFeatures getMIPSFeatures() const
static Expected< std::unique_ptr< ELFObjectFile< ELFT > > > createPtr(MemoryBufferRef Object)
bool isThumb() const
Tests whether the target is Thumb (little and big endian).
const char * getBufferStart() const
Lightweight error class with error context and mandatory checking.
const FeatureBitset Features
SubtargetFeatures getARMFeatures() const
SubtargetFeatures getRISCVFeatures() const