mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
MCAssembler: Switch MCAsmFixup to storing MCFixupKind instead of just a size.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96094 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -89,6 +89,18 @@ public:
|
||||
unsigned getOffset() const { return Offset; }
|
||||
|
||||
const MCExpr *getValue() const { return Value; }
|
||||
|
||||
/// getKindForSize - Return the generic fixup kind for a value with the given
|
||||
/// size. It is an error to pass an unsupported size.
|
||||
static MCFixupKind getKindForSize(unsigned Size) {
|
||||
switch (Size) {
|
||||
default: assert(0 && "Invalid generic fixup size!");
|
||||
case 1: return FK_Data_1;
|
||||
case 2: return FK_Data_2;
|
||||
case 4: return FK_Data_4;
|
||||
case 8: return FK_Data_8;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
} // End llvm namespace
|
||||
|
Reference in New Issue
Block a user