diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-08-21 23:07:38 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-08-21 23:07:38 +0000 |
commit | 3d153ff2f9b02dfed57352ab3102c5852d178b06 (patch) | |
tree | 8bfb00541414771ea0d63a51849f3d3b532b262a /include/llvm | |
parent | 581ed7a565878bbec9cf31b4a52b2ca96f074246 (diff) | |
download | external_llvm-3d153ff2f9b02dfed57352ab3102c5852d178b06.zip external_llvm-3d153ff2f9b02dfed57352ab3102c5852d178b06.tar.gz external_llvm-3d153ff2f9b02dfed57352ab3102c5852d178b06.tar.bz2 |
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/llvm')
-rw-r--r-- | include/llvm/MC/MCAssembler.h | 28 |
1 files changed, 11 insertions, 17 deletions
diff --git a/include/llvm/MC/MCAssembler.h b/include/llvm/MC/MCAssembler.h index a5739f2..17de0b6 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; } /// @} |