80 unsigned NumElts = CDS->getNumElements();
81 assert(NumElts != 0 &&
"Can't have an empty CDS");
83 if (CDS->getElementAsInteger(NumElts-1) != 0)
87 for (
unsigned i = 0; i != NumElts-1; ++i)
88 if (CDS->getElementAsInteger(i) == 0)
94 if (isa<ConstantAggregateZero>(C))
95 return cast<ArrayType>(C->
getType())->getNumElements() == 1;
130 "Can only be used for global definitions");
179 dyn_cast<IntegerType>(ATy->getElementType())) {
180 if ((ITy->getBitWidth() == 8 || ITy->getBitWidth() == 16 ||
181 ITy->getBitWidth() == 32) &&
183 if (ITy->getBitWidth() == 8)
185 if (ITy->getBitWidth() == 16)
188 assert(ITy->getBitWidth() == 32 &&
"Unknown width");
314 switch (Encoding & 0x70) {
static SectionKind getReadOnlyWithRelLocal()
static SectionKind getKindForGlobal(const GlobalValue *GV, const TargetMachine &TM)
Reloc::Model getRelocationModel() const
virtual const MCSection * SelectSectionForGlobal(const GlobalValue *GV, SectionKind Kind, Mangler *Mang, const TargetMachine &TM) const
enable_if_c<!is_simple_type< Y >::value, typename cast_retty< X, const Y >::ret_type >::type dyn_cast(const Y &Val)
static SectionKind getDataRel()
void getNameWithPrefix(SmallVectorImpl< char > &OutName, const GlobalValue *GV, bool isImplicitlyPrivate, bool UseGlobalPrefix=true)
static SectionKind getDataRelLocal()
virtual const MCSection * getSectionForConstant(SectionKind Kind) const
static SectionKind getMergeableConst8()
bool hasAvailableExternallyLinkage() const
static SectionKind getMergeableConst16()
static SectionKind getMergeable1ByteCString()
static SectionKind getCommon()
const MCSection * getDataSection() const
const Constant * getInitializer() const
static SectionKind getMergeableConst4()
LLVM_ATTRIBUTE_NORETURN void report_fatal_error(const char *reason, bool gen_crash_diag=true)
MCSymbol * GetOrCreateSymbol(StringRef Name)
bool hasCommonLinkage() const
static SectionKind getBSS()
static SectionKind getMergeable4ByteCString()
MCSymbol * CreateTempSymbol()
bool isThreadLocal() const
If the value is "Thread Local", its value isn't shared by the threads.
#define llvm_unreachable(msg)
virtual void Initialize(MCContext &ctx, const TargetMachine &TM)
const MCExpr * getTTypeReference(const MCSymbolRefExpr *Sym, unsigned Encoding, MCStreamer &Streamer) const
static const MCBinaryExpr * CreateSub(const MCExpr *LHS, const MCExpr *RHS, MCContext &Ctx)
virtual const MCExpr * getDebugThreadLocalSymbol(const MCSymbol *Sym) const
Create a symbol reference to describe the given TLS variable when emitting the address in debug info...
const MCSection * getTextSection() const
static SectionKind getThreadData()
MCContext & getContext() const
static const MCSymbolRefExpr * Create(const MCSymbol *Symbol, MCContext &Ctx)
void InitMCObjectFileInfo(StringRef TT, Reloc::Model RM, CodeModel::Model CM, MCContext &ctx)
static SectionKind getBSSLocal()
const MCSection * SectionForGlobal(const GlobalValue *GV, SectionKind Kind, Mangler *Mang, const TargetMachine &TM) const
const MCSection * BSSSection
BSSSection - Section that is default initialized to zero.
CodeModel::Model getCodeModel() const
LLVM Constant Representation.
virtual const MCSection * getExplicitSectionGlobal(const GlobalValue *GV, SectionKind Kind, Mangler *Mang, const TargetMachine &TM) const =0
static bool isSuitableForBSS(const GlobalVariable *GV, bool NoZerosInBSS)
Integer representation type.
const std::string & getSection() const
bool isThreadLocal() const
bool hasExternalLinkage() const
PossibleRelocationsTy getRelocationInfo() const
static SectionKind getThreadBSS()
virtual void EmitLabel(MCSymbol *Symbol)
uint64_t getTypeAllocSize(Type *Ty) const
static SectionKind getDataNoRel()
static SectionKind getMergeableConst()
static SectionKind getReadOnlyWithRel()
const MCSection * ReadOnlySection
virtual void emitPersonalityValue(MCStreamer &Streamer, const TargetMachine &TM, const MCSymbol *Sym) const
StringRef str() const
Explicit conversion to StringRef.
const StringRef getTargetTriple() const
static bool IsNullTerminatedString(const Constant *C)
static SectionKind getMergeable2ByteCString()
virtual ~TargetLoweringObjectFile()
virtual const MCExpr * getTTypeGlobalReference(const GlobalValue *GV, Mangler *Mang, MachineModuleInfo *MMI, unsigned Encoding, MCStreamer &Streamer) const
bool isDeclaration() const
virtual const DataLayout * getDataLayout() const
static SectionKind getBSSExtern()
const MCSection * DataSection
bool hasLocalLinkage() const
bool hasUnnamedAddr() const
virtual MCSymbol * getCFIPersonalitySymbol(const GlobalValue *GV, Mangler *Mang, MachineModuleInfo *MMI) const
static SectionKind getReadOnly()
MCSymbol * getSymbol(Mangler &M, const GlobalValue *GV) const
static SectionKind getText()