aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/MC/MCAssembler.h
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2010-05-12 22:51:32 +0000
committerDaniel Dunbar <daniel@zuster.org>2010-05-12 22:51:32 +0000
commit3153fec733acd079a9e681d16d39253b9517e02c (patch)
treed2df239cd68556ed78cea279f9439ea812668dca /include/llvm/MC/MCAssembler.h
parente73d49eda2cb4fc30b52c4a241acf69c8af98302 (diff)
downloadexternal_llvm-3153fec733acd079a9e681d16d39253b9517e02c.zip
external_llvm-3153fec733acd079a9e681d16d39253b9517e02c.tar.gz
external_llvm-3153fec733acd079a9e681d16d39253b9517e02c.tar.bz2
MC: Switch MCFillFragment to storing total fill size instead of a count. This allows using ValueSize==0 to represent a virtual fill.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103662 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/MC/MCAssembler.h')
-rw-r--r--include/llvm/MC/MCAssembler.h16
1 files changed, 10 insertions, 6 deletions
diff --git a/include/llvm/MC/MCAssembler.h b/include/llvm/MC/MCAssembler.h
index ddf4ec9..22b8ff4 100644
--- a/include/llvm/MC/MCAssembler.h
+++ b/include/llvm/MC/MCAssembler.h
@@ -293,17 +293,21 @@ class MCFillFragment : public MCFragment {
/// Value - Value to use for filling bytes.
int64_t Value;
- /// ValueSize - The size (in bytes) of \arg Value to use when filling.
+ /// ValueSize - The size (in bytes) of \arg Value to use when filling, or 0 if
+ /// this is a virtual fill fragment.
unsigned ValueSize;
- /// Count - The number of copies of \arg Value to insert.
- uint64_t Count;
+ /// Size - The number of bytes to insert.
+ uint64_t Size;
public:
- MCFillFragment(int64_t _Value, unsigned _ValueSize, uint64_t _Count,
+ MCFillFragment(int64_t _Value, unsigned _ValueSize, uint64_t _Size,
MCSectionData *SD = 0)
: MCFragment(FT_Fill, SD),
- Value(_Value), ValueSize(_ValueSize), Count(_Count) {}
+ Value(_Value), ValueSize(_ValueSize), Size(_Size) {
+ assert((!ValueSize || (Size % ValueSize) == 0) &&
+ "Fill size must be a multiple of the value size!");
+ }
/// @name Accessors
/// @{
@@ -312,7 +316,7 @@ public:
unsigned getValueSize() const { return ValueSize; }
- uint64_t getCount() const { return Count; }
+ uint64_t getSize() const { return Size; }
/// @}