mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-20 02:34:48 +00:00
Add MachineConstantPoolEntry getOffset() accessor.
llvm-svn: 30325
This commit is contained in:
parent
b25fd42e43
commit
489428e6f8
@ -67,8 +67,8 @@ struct MachineConstantPoolEntry {
|
||||
MachineConstantPoolValue *MachineCPVal;
|
||||
} Val;
|
||||
|
||||
/// The offset of the constant from the start of the pool. It's really
|
||||
/// 31-bit only. The top bit is set when Val is a MachineConstantPoolValue.
|
||||
/// The offset of the constant from the start of the pool. The top bit is set
|
||||
/// when Val is a MachineConstantPoolValue.
|
||||
unsigned Offset;
|
||||
|
||||
MachineConstantPoolEntry(Constant *V, unsigned O)
|
||||
@ -87,6 +87,10 @@ struct MachineConstantPoolEntry {
|
||||
return (int)Offset < 0;
|
||||
}
|
||||
|
||||
int getOffset() const {
|
||||
return Offset & ~(1 << (sizeof(unsigned)*8-1));
|
||||
}
|
||||
|
||||
const Type *getType() const;
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user