LLVM
8.0.1
|
#include "llvm/MC/MCSymbolELF.h"
Public Member Functions | |
MCSymbolELF (const StringMapEntry< bool > *Name, bool isTemporary) | |
void | setSize (const MCExpr *SS) |
const MCExpr * | getSize () const |
void | setVisibility (unsigned Visibility) |
unsigned | getVisibility () const |
void | setOther (unsigned Other) |
unsigned | getOther () const |
void | setType (unsigned Type) const |
unsigned | getType () const |
void | setBinding (unsigned Binding) const |
unsigned | getBinding () const |
bool | isBindingSet () const |
void | setIsWeakrefUsedInReloc () const |
bool | isWeakrefUsedInReloc () const |
void | setIsSignature () const |
bool | isSignature () const |
Public Member Functions inherited from llvm::MCSymbol | |
MCSymbol (const MCSymbol &)=delete | |
MCSymbol & | operator= (const MCSymbol &)=delete |
StringRef | getName () const |
getName - Get the symbol name. More... | |
bool | isRegistered () const |
void | setIsRegistered (bool Value) const |
void | setUsedInReloc () const |
bool | isUsedInReloc () const |
uint32_t | getIndex () const |
Get the (implementation defined) index. More... | |
void | setIndex (uint32_t Value) const |
Set the (implementation defined) index. More... | |
bool | isUnset () const |
uint64_t | getOffset () const |
void | setOffset (uint64_t Value) |
uint64_t | getCommonSize () const |
Return the size of a 'common' symbol. More... | |
void | setCommon (uint64_t Size, unsigned Align) |
Mark this symbol as being 'common'. More... | |
unsigned | getCommonAlignment () const |
Return the alignment of a 'common' symbol. More... | |
bool | declareCommon (uint64_t Size, unsigned Align) |
Declare this symbol as being 'common'. More... | |
bool | isCommon () const |
Is this a 'common' symbol. More... | |
MCFragment * | getFragment (bool SetUsed=true) const |
bool | isExternal () const |
void | setExternal (bool Value) const |
bool | isPrivateExtern () const |
void | setPrivateExtern (bool Value) |
void | print (raw_ostream &OS, const MCAsmInfo *MAI) const |
print - Print the value to the stream OS . More... | |
void | dump () const |
dump - Print the value to stderr. More... | |
bool | isTemporary () const |
isTemporary - Check if this is an assembler temporary symbol. More... | |
bool | isUsed () const |
isUsed - Check if this is used. More... | |
bool | isRedefinable () const |
Check if this symbol is redefinable. More... | |
void | setRedefinable (bool Value) |
Mark this symbol as redefinable. More... | |
void | redefineIfPossible () |
Prepare this symbol to be redefined. More... | |
bool | isDefined () const |
isDefined - Check if this symbol is defined (i.e., it has an address). More... | |
bool | isInSection () const |
isInSection - Check if this symbol is defined in some section (i.e., it is defined but not absolute). More... | |
bool | isUndefined (bool SetUsed=true) const |
isUndefined - Check if this symbol undefined (i.e., implicitly defined). More... | |
bool | isAbsolute () const |
isAbsolute - Check if this is an absolute symbol. More... | |
MCSection & | getSection () const |
Get the section associated with a defined, non-absolute symbol. More... | |
void | setFragment (MCFragment *F) const |
Mark the symbol as defined in the fragment F . More... | |
void | setUndefined () |
Mark the symbol as undefined. More... | |
bool | isELF () const |
bool | isCOFF () const |
bool | isMachO () const |
bool | isWasm () const |
bool | isVariable () const |
isVariable - Check if this is a variable symbol. More... | |
const MCExpr * | getVariableValue (bool SetUsed=true) const |
getVariableValue - Get the value for variable symbols. More... | |
void | setVariableValue (const MCExpr *Value) |
Static Public Member Functions | |
static bool | classof (const MCSymbol *S) |
Additional Inherited Members | |
Protected Types inherited from llvm::MCSymbol | |
enum | SymbolKind { SymbolKindUnset, SymbolKindCOFF, SymbolKindELF, SymbolKindMachO, SymbolKindWasm } |
The kind of the symbol. More... | |
enum | Contents : uint8_t { SymContentsUnset, SymContentsOffset, SymContentsVariable, SymContentsCommon } |
A symbol can contain an Offset, or Value, or be Common, but never more than one of these. More... | |
enum | : unsigned { NumCommonAlignmentBits = 5 } |
The alignment of the symbol, if it is 'common', or -1. More... | |
enum | : unsigned { NumFlagsBits = 16 } |
The Flags field is used by object file implementations to store additional per symbol information which is not easily classified. More... | |
using | NameEntryStorageTy = union { const StringMapEntry< bool > *NameEntry |
The name for a symbol. More... | |
Protected Member Functions inherited from llvm::MCSymbol | |
MCSymbol (SymbolKind Kind, const StringMapEntry< bool > *Name, bool isTemporary) | |
void * | operator new (size_t s, const StringMapEntry< bool > *Name, MCContext &Ctx) |
uint32_t | getFlags () const |
Get the (implementation defined) symbol flags. More... | |
void | setFlags (uint32_t Value) const |
Set the (implementation defined) symbol flags. More... | |
void | modifyFlags (uint32_t Value, uint32_t Mask) const |
Modify the flags via a mask. More... | |
Protected Attributes inherited from llvm::MCSymbol | |
PointerIntPair< MCFragment *, 1 > | FragmentAndHasName |
If a symbol has a Fragment, the section is implied, so we only need one pointer. More... | |
unsigned | IsTemporary: 1 |
IsTemporary - True if this is an assembler temporary label, which typically does not survive in the .o file's symbol table. More... | |
unsigned | IsRedefinable: 1 |
True if this symbol can be redefined. More... | |
unsigned | IsUsed: 1 |
IsUsed - True if this symbol has been used. More... | |
unsigned | IsRegistered: 1 |
unsigned | IsExternal: 1 |
This symbol is visible outside this translation unit. More... | |
unsigned | IsPrivateExtern: 1 |
This symbol is private extern. More... | |
unsigned | Kind: 3 |
LLVM RTTI discriminator. More... | |
unsigned | IsUsedInReloc: 1 |
True if we have created a relocation that uses this symbol. More... | |
unsigned | SymbolContents: 2 |
This is actually a Contents enumerator, but is unsigned to avoid sign extension and achieve better bitpacking with MSVC. More... | |
unsigned | CommonAlignLog2: NumCommonAlignmentBits |
uint32_t | Flags: NumFlagsBits |
uint32_t | Index = 0 |
Index field, for use by the object file implementation. More... | |
union { | |
uint64_t Offset | |
The offset to apply to the fragment address to form this symbol's value. More... | |
uint64_t CommonSize | |
The size of the symbol, if it is 'common'. More... | |
const MCExpr * Value | |
If non-null, the value for a variable symbol. More... | |
}; | |
uint64_t | AlignmentPadding |
Static Protected Attributes inherited from llvm::MCSymbol | |
static MCFragment * | AbsolutePseudoFragment = &SentinelFragment |
Definition at line 15 of file MCSymbolELF.h.
|
inline |
Definition at line 21 of file MCSymbolELF.h.
Definition at line 47 of file MCSymbolELF.h.
References llvm::MCSymbol::isELF().
unsigned llvm::MCSymbolELF::getBinding | ( | ) | const |
Definition at line 67 of file MCSymbolELF.cpp.
References llvm::MCSymbol::getFlags(), isBindingSet(), llvm::MCSymbol::isDefined(), isSignature(), llvm::MCSymbol::isUsedInReloc(), isWeakrefUsedInReloc(), llvm_unreachable, llvm::ELF::STB_GLOBAL, llvm::ELF::STB_GNU_UNIQUE, llvm::ELF::STB_LOCAL, and llvm::ELF::STB_WEAK.
Referenced by getMatchingLoType(), getSize(), isWeak(), and setType().
unsigned llvm::MCSymbolELF::getOther | ( | ) | const |
Definition at line 173 of file MCSymbolELF.cpp.
References llvm::MCSymbol::getFlags(), and Other.
Referenced by createPPCMCAsmInfo(), getSize(), and isWeak().
Definition at line 25 of file MCSymbolELF.h.
References getBinding(), getOther(), getType(), getVisibility(), isBindingSet(), isSignature(), isWeakrefUsedInReloc(), Other, setBinding(), setIsSignature(), setIsWeakrefUsedInReloc(), setOther(), setType(), setVisibility(), and Visibility.
unsigned llvm::MCSymbolELF::getType | ( | ) | const |
Definition at line 128 of file MCSymbolELF.cpp.
References llvm::MCSymbol::getFlags(), llvm_unreachable, llvm::ELF::STT_COMMON, llvm::ELF::STT_FUNC, llvm::ELF::STT_GNU_IFUNC, llvm::ELF::STT_NOTYPE, llvm::ELF::STT_OBJECT, llvm::ELF::STT_SECTION, and llvm::ELF::STT_TLS.
Referenced by getSize(), isWeak(), and setBinding().
unsigned llvm::MCSymbolELF::getVisibility | ( | ) | const |
Definition at line 158 of file MCSymbolELF.cpp.
References assert(), llvm::MCSymbol::getFlags(), llvm::ELF::STV_DEFAULT, llvm::ELF::STV_HIDDEN, llvm::ELF::STV_INTERNAL, llvm::ELF::STV_PROTECTED, and Visibility.
Referenced by getSize().
bool llvm::MCSymbolELF::isBindingSet | ( | ) | const |
Definition at line 201 of file MCSymbolELF.cpp.
References llvm::MCSymbol::getFlags().
Referenced by getBinding(), getSize(), and isWeak().
bool llvm::MCSymbolELF::isSignature | ( | ) | const |
Definition at line 192 of file MCSymbolELF.cpp.
References llvm::MCSymbol::getFlags(), and llvm::MCSymbol::setFlags().
Referenced by getBinding(), getSize(), and isWeak().
bool llvm::MCSymbolELF::isWeakrefUsedInReloc | ( | ) | const |
Definition at line 183 of file MCSymbolELF.cpp.
References llvm::MCSymbol::getFlags().
Referenced by getBinding(), getSize(), and isWeak().
void llvm::MCSymbolELF::setBinding | ( | unsigned | Binding | ) | const |
Definition at line 42 of file MCSymbolELF.cpp.
References llvm::MCSymbol::getFlags(), getType(), llvm_unreachable, llvm::MCSymbol::setFlags(), setType(), llvm::ELF::STB_GLOBAL, llvm::ELF::STB_GNU_UNIQUE, llvm::ELF::STB_LOCAL, llvm::ELF::STB_WEAK, llvm::ELF::STT_NOTYPE, and llvm::ELF::STT_SECTION.
Referenced by llvm::AMDGPUTargetELFStreamer::EmitAmdhsaKernelDescriptor(), getSize(), and llvm::MCContext::renameELFSection().
void llvm::MCSymbolELF::setIsSignature | ( | ) | const |
Definition at line 187 of file MCSymbolELF.cpp.
References llvm::MCSymbol::getFlags(), and llvm::MCSymbol::setFlags().
Referenced by getSize().
void llvm::MCSymbolELF::setIsWeakrefUsedInReloc | ( | ) | const |
Definition at line 178 of file MCSymbolELF.cpp.
References llvm::MCSymbol::getFlags(), and llvm::MCSymbol::setFlags().
Referenced by getSize().
void llvm::MCSymbolELF::setOther | ( | unsigned | Other | ) |
Definition at line 165 of file MCSymbolELF.cpp.
References assert(), llvm::MCSymbol::getFlags(), and llvm::MCSymbol::setFlags().
Referenced by createPPCMCAsmInfo(), and getSize().
Definition at line 23 of file MCSymbolELF.h.
Referenced by llvm::AMDGPUTargetELFStreamer::EmitAmdhsaKernelDescriptor().
void llvm::MCSymbolELF::setType | ( | unsigned | Type | ) | const |
Definition at line 95 of file MCSymbolELF.cpp.
References getBinding(), llvm::MCSymbol::getFlags(), llvm_unreachable, llvm::MCSymbol::setFlags(), llvm::ELF::STB_LOCAL, llvm::ELF::STT_COMMON, llvm::ELF::STT_FUNC, llvm::ELF::STT_GNU_IFUNC, llvm::ELF::STT_NOTYPE, llvm::ELF::STT_OBJECT, llvm::ELF::STT_SECTION, and llvm::ELF::STT_TLS.
Referenced by llvm::AMDGPUTargetELFStreamer::EmitAMDGPUSymbolType(), llvm::AMDGPUTargetELFStreamer::EmitAmdhsaKernelDescriptor(), getSize(), llvm::MCContext::renameELFSection(), and setBinding().
void llvm::MCSymbolELF::setVisibility | ( | unsigned | Visibility | ) |
Definition at line 150 of file MCSymbolELF.cpp.
References assert(), llvm::MCSymbol::getFlags(), llvm::MCSymbol::setFlags(), llvm::ELF::STV_DEFAULT, llvm::ELF::STV_HIDDEN, llvm::ELF::STV_INTERNAL, and llvm::ELF::STV_PROTECTED.
Referenced by getSize().