mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-12-20 03:17:48 +00:00
IR: Use a bitmask to access GlobalObject subclass data
Make room for more than just `Function::isMaterializable()` in the `GlobalObject` subclass data bitfield. Since we're treating it like a bitfield, change `Function::Function()` to zero-out the whole thing. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@235770 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -77,6 +77,16 @@ private:
|
||||
* bit 3-6: CallingConvention
|
||||
*/
|
||||
|
||||
/// Bits from GlobalObject::GlobalObjectSubclassData.
|
||||
enum {
|
||||
/// Whether this function is materializable.
|
||||
IsMaterializableBit = 1 << 0
|
||||
};
|
||||
void setGlobalObjectBit(unsigned Mask, bool Value) {
|
||||
setGlobalObjectSubClassData((~Mask & getGlobalObjectSubClassData()) |
|
||||
(Value ? Mask : 0u));
|
||||
}
|
||||
|
||||
friend class SymbolTableListTraits<Function, Module>;
|
||||
|
||||
void setParent(Module *parent);
|
||||
|
||||
Reference in New Issue
Block a user