mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-10 02:17:46 +00:00
Move IsUsedInReloc from MCSymbolELF to MCSymbol.
There is a free bit is MCSymbol and MachO needs the same information. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239933 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -621,8 +621,6 @@ private:
|
||||
|
||||
SymbolDataListType Symbols;
|
||||
|
||||
DenseSet<const MCSymbol *> LocalsUsedInReloc;
|
||||
|
||||
std::vector<IndirectSymbolData> IndirectSymbols;
|
||||
|
||||
std::vector<DataRegionData> DataRegions;
|
||||
@@ -713,9 +711,6 @@ private:
|
||||
MCFragment &F, const MCFixup &Fixup);
|
||||
|
||||
public:
|
||||
void addLocalUsedInReloc(const MCSymbol &Sym);
|
||||
bool isLocalUsedInReloc(const MCSymbol &Sym) const;
|
||||
|
||||
/// Compute the effective fragment size assuming it is laid out at the given
|
||||
/// \p SectionAddress and \p FragmentOffset.
|
||||
uint64_t computeFragmentSize(const MCAsmLayout &Layout,
|
||||
|
||||
@@ -95,6 +95,9 @@ protected:
|
||||
/// unsigned to avoid sign extension and achieve better bitpacking with MSVC.
|
||||
unsigned Kind : 2;
|
||||
|
||||
/// True if we have created a relocation that uses this symbol.
|
||||
mutable unsigned IsUsedInReloc : 1;
|
||||
|
||||
/// Index field, for use by the object file implementation.
|
||||
mutable uint32_t Index = 0;
|
||||
|
||||
@@ -129,10 +132,10 @@ protected: // MCContext creates and uniques these.
|
||||
} NameEntryStorageTy;
|
||||
|
||||
MCSymbol(SymbolKind Kind, const StringMapEntry<bool> *Name, bool isTemporary)
|
||||
: Value(nullptr), IsTemporary(isTemporary),
|
||||
IsRedefinable(false), IsUsed(false), IsRegistered(false),
|
||||
IsExternal(false), IsPrivateExtern(false), HasName(!!Name),
|
||||
Kind(Kind) {
|
||||
: Value(nullptr), IsTemporary(isTemporary), IsRedefinable(false),
|
||||
IsUsed(false), IsRegistered(false), IsExternal(false),
|
||||
IsPrivateExtern(false), HasName(!!Name), Kind(Kind),
|
||||
IsUsedInReloc(false) {
|
||||
Offset = 0;
|
||||
if (Name)
|
||||
getNameEntryPtr() = Name;
|
||||
@@ -189,6 +192,9 @@ public:
|
||||
bool isRegistered() const { return IsRegistered; }
|
||||
void setIsRegistered(bool Value) const { IsRegistered = Value; }
|
||||
|
||||
void setUsedInReloc() const { IsUsedInReloc = true; }
|
||||
bool isUsedInReloc() const { return IsUsedInReloc; }
|
||||
|
||||
/// \name Accessors
|
||||
/// @{
|
||||
|
||||
|
||||
@@ -38,9 +38,6 @@ public:
|
||||
|
||||
bool isBindingSet() const;
|
||||
|
||||
void setUsedInReloc() const;
|
||||
bool isUsedInReloc() const;
|
||||
|
||||
void setIsWeakrefUsedInReloc() const;
|
||||
bool isWeakrefUsedInReloc() const;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user