aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/MC/MCAssembler.h
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2010-05-13 01:10:26 +0000
committerDaniel Dunbar <daniel@zuster.org>2010-05-13 01:10:26 +0000
commit456b5012704bcece2c8c28783e6efabb7b998616 (patch)
treed1a7d3c962927705fc264526adfca23e48b32953 /include/llvm/MC/MCAssembler.h
parentb5844ff1c44f0427bcf132eaece945da411e650f (diff)
MC: Add MCAlignFragment::OnlyAlignAddress bit. This is a bit of magic that says the align fragment shouldn't contribute to the logical section size, it is will be used for cleaning up the code to handle section alignment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103690 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/MC/MCAssembler.h')
-rw-r--r--include/llvm/MC/MCAssembler.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/include/llvm/MC/MCAssembler.h b/include/llvm/MC/MCAssembler.h
index b641b0241d..8918dbbb3c 100644
--- a/include/llvm/MC/MCAssembler.h
+++ b/include/llvm/MC/MCAssembler.h
@@ -258,12 +258,19 @@ class MCAlignFragment : public MCFragment {
/// target dependent.
bool EmitNops : 1;
+ /// OnlyAlignAddress - Flag to indicate that this align is only used to adjust
+ /// the address space size of a section and that it should not be included as
+ /// part of the section size. This flag can only be used on the last fragment
+ /// in a section.
+ bool OnlyAlignAddress : 1;
+
public:
MCAlignFragment(unsigned _Alignment, int64_t _Value, unsigned _ValueSize,
unsigned _MaxBytesToEmit, MCSectionData *SD = 0)
: MCFragment(FT_Align, SD), Alignment(_Alignment),
Value(_Value),ValueSize(_ValueSize),
- MaxBytesToEmit(_MaxBytesToEmit), EmitNops(false) {}
+ MaxBytesToEmit(_MaxBytesToEmit), EmitNops(false),
+ OnlyAlignAddress(false) {}
/// @name Accessors
/// @{
@@ -279,6 +286,9 @@ public:
bool hasEmitNops() const { return EmitNops; }
void setEmitNops(bool Value) { EmitNops = Value; }
+ bool hasOnlyAlignAddress() const { return OnlyAlignAddress; }
+ void setOnlyAlignAddress(bool Value) { OnlyAlignAddress = Value; }
+
/// @}
static bool classof(const MCFragment *F) {