23 using namespace dwarf;
41 GV, Encoding, Mang, TM, MMI, Streamer);
63 const MCExpr *X86ELFTargetObjectFile::getDebugThreadLocalSymbol(
69 X86LinuxNaClTargetObjectFile::Initialize(
MCContext &Ctx,
75 const MCExpr *X86WindowsTargetObjectFile::getExecutableRelativeSymbol(
89 if (!SubLHS || !SubRHS)
95 SubRHS->getPointerAddressSpace() != 0)
103 if (!GOLHS || !GVRHS)
110 if (GVRHS->isThreadLocal() || GVRHS->getName() !=
"__ImageBase" ||
111 !GVRHS->hasExternalLinkage() || GVRHS->hasInitializer() ||
116 if (GOLHS->isThreadLocal())
127 unsigned Size = HexString.size();
128 assert(Width >= Size &&
"hex string is too large!");
129 HexString.insert(HexString.begin(), Width - Size,
'0');
136 if (isa<UndefValue>(C)) {
138 }
else if (
const auto *CFP = dyn_cast<ConstantFP>(C)) {
140 }
else if (
const auto *CI = dyn_cast<ConstantInt>(C)) {
143 unsigned NumElements;
144 if (isa<VectorType>(Ty))
148 std::string HexString;
149 for (
int I = NumElements - 1, E = -1;
I != E; --
I)
162 std::string COMDATSymName;
168 if (!COMDATSymName.empty())
169 return getContext().getCOFFSection(
".rdata", Characteristics, Kind,
Instances of this class represent a uniqued identifier for a section in the current translation unit...
MCSymbol * getCFIPersonalitySymbol(const GlobalValue *GV, Mangler &Mang, const TargetMachine &TM, MachineModuleInfo *MMI) const override
bool isMergeableConst() const
static const MCSymbolRefExpr * create(const MCSymbol *Symbol, MCContext &Ctx)
This represents an "assembler immediate".
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
static std::string scalarConstantToHexString(const Constant *C)
static std::string APIntToHexString(const APInt &AI)
uint64_t getLimitedValue(uint64_t Limit=~0ULL) const
If this value is smaller than the specified limit, return it, otherwise return the limit value...
unsigned getPointerAddressSpace() const
Method to return the address space of the pointer operand.
const MCExpr * getTTypeGlobalReference(const GlobalValue *GV, unsigned Encoding, Mangler &Mang, const TargetMachine &TM, MachineModuleInfo *MMI, MCStreamer &Streamer) const override
The mach-o version of this method defaults to returning a stub reference.
const MCExpr * getTTypeGlobalReference(const GlobalValue *GV, unsigned Encoding, Mangler &Mang, const TargetMachine &TM, MachineModuleInfo *MMI, MCStreamer &Streamer) const override
The mach-o version of this method defaults to returning a stub reference.
virtual void Initialize(MCContext &ctx, const TargetMachine &TM)
This method must be called before any actual lowering is done.
Base class for the full range of assembler expressions which are needed for parsing.
Value * getPointerOperand()
Context object for machine code objects.
ConstantExpr - a constant value that is initialized with an expression using other constant values...
static const MCBinaryExpr * createAdd(const MCExpr *LHS, const MCExpr *RHS, MCContext &Ctx)
bool isMergeableConst16() const
Streaming machine code generation interface.
The instances of the Type class are immutable: once they are created, they are never changed...
This is an important base class in LLVM.
unsigned getBitWidth() const
Return the number of bits in the APInt.
SectionKind - This is a simple POD value that classifies the properties of a section.
Value * getOperand(unsigned i) const
virtual MCSection * getSectionForConstant(SectionKind Kind, const Constant *C) const
Given a constant with the SectionKind, return a section that it should be placed in.
Constant * getAggregateElement(unsigned Elt) const
getAggregateElement - For aggregates (struct/array/vector) return the constant that corresponds to th...
MCSymbol * getSymbol(const GlobalValue *GV, Mangler &Mang) const
unsigned UseInitArray
UseInitArray - Use .init_array instead of .ctors for static constructors.
unsigned getVectorNumElements() const
Type * getType() const
All values are typed, get the type of this value.
bool isMergeableConst8() const
Class for arbitrary precision integers.
LLVM_ATTRIBUTE_UNUSED_RESULT std::enable_if< !is_simple_type< Y >::value, typename cast_retty< X, const Y >::ret_type >::type dyn_cast(const Y &Val)
COFFYAML::WeakExternalCharacteristics Characteristics
uint64_t getArrayNumElements() const
const MCExpr * getIndirectSymViaGOTPCRel(const MCSymbol *Sym, const MCValue &MV, int64_t Offset, MachineModuleInfo *MMI, MCStreamer &Streamer) const override
Get MachO PC relative GOT entry relocation.
static std::string utohexstr(uint64_t X, bool LowerCase=false)
int64_t getConstant() const
const ARM::ArchExtKind Kind
unsigned getPrimitiveSizeInBits() const LLVM_READONLY
getPrimitiveSizeInBits - Return the basic size of this type if it is a primitive type.
bool isMergeableConst4() const
Primary interface to the complete machine description for the target machine.
static APInt getNullValue(unsigned numBits)
Get the '0' value.
static const MCConstantExpr * create(int64_t Value, MCContext &Ctx)
MachineModuleInfo - This class contains meta information specific to a module.
This file describes how to lower LLVM code to machine code.