mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-23 05:29:23 +00:00
Make flags get/set method protected so that all flags have to be managed by subclasses.
All of ELF, COFF and MachO now manipulate the flags in helpers so we don't need anyone to read the flags directly, but instead via those helpers. Reviewed by Rafael Espíndola. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239317 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
d3869ee8d2
commit
1a8319cbef
@ -290,17 +290,6 @@ public:
|
||||
/// Is this a 'common' symbol.
|
||||
bool isCommon() const { return CommonAlign != -1U; }
|
||||
|
||||
/// Get the (implementation defined) symbol flags.
|
||||
uint32_t getFlags() const { return Flags; }
|
||||
|
||||
/// Set the (implementation defined) symbol flags.
|
||||
void setFlags(uint32_t Value) const { Flags = Value; }
|
||||
|
||||
/// Modify the flags via a mask
|
||||
void modifyFlags(uint32_t Value, uint32_t Mask) const {
|
||||
Flags = (Flags & ~Mask) | Value;
|
||||
}
|
||||
|
||||
MCFragment *getFragment() const {
|
||||
if (!HasFragment)
|
||||
return nullptr;
|
||||
@ -322,6 +311,18 @@ public:
|
||||
|
||||
/// dump - Print the value to stderr.
|
||||
void dump() const;
|
||||
|
||||
protected:
|
||||
/// Get the (implementation defined) symbol flags.
|
||||
uint32_t getFlags() const { return Flags; }
|
||||
|
||||
/// Set the (implementation defined) symbol flags.
|
||||
void setFlags(uint32_t Value) const { Flags = Value; }
|
||||
|
||||
/// Modify the flags via a mask
|
||||
void modifyFlags(uint32_t Value, uint32_t Mask) const {
|
||||
Flags = (Flags & ~Mask) | Value;
|
||||
}
|
||||
};
|
||||
|
||||
inline raw_ostream &operator<<(raw_ostream &OS, const MCSymbol &Sym) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user