summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-08-21 23:07:38 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-08-21 23:07:38 +0000
commitd6f761e0eb610936a6b8495360b62696dcd85164 (patch)
tree8bfb00541414771ea0d63a51849f3d3b532b262a /include
parent0afb9f5ac2056fdde1e92378eee404a097dd7eca (diff)
downloadllvm-d6f761e0eb610936a6b8495360b62696dcd85164.tar.gz
llvm-d6f761e0eb610936a6b8495360b62696dcd85164.tar.bz2
llvm-d6f761e0eb610936a6b8495360b62696dcd85164.tar.xz
llvm-mc/Mach-O: Support .o emission for .org and .align.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79684 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/MC/MCAssembler.h28
1 files changed, 11 insertions, 17 deletions
diff --git a/include/llvm/MC/MCAssembler.h b/include/llvm/MC/MCAssembler.h
index a5739f2bc9..17de0b68b4 100644
--- a/include/llvm/MC/MCAssembler.h
+++ b/include/llvm/MC/MCAssembler.h
@@ -64,7 +64,7 @@ public:
FragmentType getKind() const { return Kind; }
// FIXME: This should be abstract, fix sentinel.
- virtual unsigned getMaxFileSize() const {
+ virtual uint64_t getMaxFileSize() const {
assert(0 && "Invalid getMaxFileSize call !");
};
@@ -102,7 +102,7 @@ public:
/// @name Accessors
/// @{
- unsigned getMaxFileSize() const {
+ uint64_t getMaxFileSize() const {
return Contents.size();
}
@@ -141,7 +141,7 @@ public:
/// @name Accessors
/// @{
- unsigned getMaxFileSize() const {
+ uint64_t getMaxFileSize() const {
return std::max(Alignment - 1, MaxBytesToEmit);
}
@@ -180,7 +180,7 @@ public:
/// @name Accessors
/// @{
- unsigned getMaxFileSize() const {
+ uint64_t getMaxFileSize() const {
return ValueSize * Count;
}
@@ -203,29 +203,23 @@ class MCOrgFragment : public MCFragment {
MCValue Offset;
/// Value - Value to use for filling bytes.
- int64_t Value;
-
- /// ValueSize - The size (in bytes) of \arg Value to use when filling.
- unsigned ValueSize;
+ int8_t Value;
public:
- MCOrgFragment(MCValue _Offset, int64_t _Value, unsigned _ValueSize,
- MCSectionData *SD = 0)
+ MCOrgFragment(MCValue _Offset, int8_t _Value, MCSectionData *SD = 0)
: MCFragment(FT_Org, SD),
- Offset(_Offset), Value(_Value), ValueSize(_ValueSize) {}
+ Offset(_Offset), Value(_Value) {}
/// @name Accessors
/// @{
- unsigned getMaxFileSize() const {
- // FIXME
- return 0;
+ uint64_t getMaxFileSize() const {
+ // FIXME: This doesn't make much sense.
+ return ~UINT64_C(0);
}
MCValue getOffset() const { return Offset; }
- int64_t getValue() const { return Value; }
-
- unsigned getValueSize() const { return ValueSize; }
+ uint8_t getValue() const { return Value; }
/// @}