9 #ifndef LLVM_MC_MCSYMBOLMACHO_H 10 #define LLVM_MC_MCSYMBOLMACHO_H 19 enum MachOSymbolFlags : uint16_t {
20 SF_DescFlagsMask = 0xFFFF,
23 SF_ReferenceTypeMask = 0x0007,
24 SF_ReferenceTypeUndefinedNonLazy = 0x0000,
25 SF_ReferenceTypeUndefinedLazy = 0x0001,
26 SF_ReferenceTypeDefined = 0x0002,
27 SF_ReferenceTypePrivateDefined = 0x0003,
28 SF_ReferenceTypePrivateUndefinedNonLazy = 0x0004,
29 SF_ReferenceTypePrivateUndefinedLazy = 0x0005,
32 SF_ThumbFunc = 0x0008,
33 SF_NoDeadStrip = 0x0020,
34 SF_WeakReference = 0x0040,
35 SF_WeakDefinition = 0x0080,
36 SF_SymbolResolver = 0x0100,
40 SF_CommonAlignmentMask = 0xF0FF,
41 SF_CommonAlignmentShift = 8
55 modifyFlags(Value ? SF_ReferenceTypeUndefinedLazy : 0,
56 SF_ReferenceTypeUndefinedLazy);
73 return getFlags() & SF_WeakReference;
80 return getFlags() & SF_WeakDefinition;
87 return getFlags() & SF_SymbolResolver;
102 assert(Value == (Value & SF_DescFlagsMask) &&
103 "Invalid .desc value!");
116 assert((1U << Log2Size) ==
Align &&
"Invalid 'common' alignment!");
121 Flags = (Flags & SF_CommonAlignmentMask) |
122 (Log2Size << SF_CommonAlignmentShift);
126 if (EncodeAsAltEntry)
127 Flags |= SF_AltEntry;
constexpr char Align[]
Key for Kernel::Arg::Metadata::mAlign.
void setReferenceTypeUndefinedLazy(bool Value) const
LLVM_ATTRIBUTE_NORETURN void report_fatal_error(Error Err, bool gen_crash_diag=true)
Report a serious error, calling any installed error handler.
This class represents lattice values for constants.
StringMapEntry - This is used to represent one value that is inserted into a StringMap.
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
static bool classof(const MCSymbol *S)
unsigned getCommonAlignment() const
Return the alignment of a 'common' symbol.
bool isCommon() const
Is this a 'common' symbol.
void setDesc(unsigned Value) const
amdgpu Simplify well known AMD library false Value Value const Twine & Name
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
uint16_t getEncodedFlags(bool EncodeAsAltEntry) const
Get the encoded value of the flags as they will be emitted in to the MachO binary.
void setSymbolResolver() const
bool isWeakReference() const
void setWeakDefinition() const
void setThumbFunc() const
bool isWeakDefinition() const
bool isTemporary() const
isTemporary - Check if this is an assembler temporary symbol.
void setFlags(uint32_t Value) const
Set the (implementation defined) symbol flags.
void clearReferenceType() const
unsigned Log2_32(uint32_t Value)
Return the floor log base 2 of the specified value, -1 if the value is zero.
void setNoDeadStrip() const
MCSymbolMachO(const StringMapEntry< bool > *Name, bool isTemporary)
StringRef getName() const
getName - Get the symbol name.
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
bool isSymbolResolver() const
LLVM Value Representation.
void setWeakReference() const
void modifyFlags(uint32_t Value, uint32_t Mask) const
Modify the flags via a mask.
uint32_t getFlags() const
Get the (implementation defined) symbol flags.
bool isNoDeadStrip() const