aboutsummaryrefslogtreecommitdiffstats
path: root/lib/MC/MCMachOStreamer.cpp
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 /lib/MC/MCMachOStreamer.cpp
parent0afb9f5ac2056fdde1e92378eee404a097dd7eca (diff)
downloadexternal_llvm-d6f761e0eb610936a6b8495360b62696dcd85164.tar.gz
external_llvm-d6f761e0eb610936a6b8495360b62696dcd85164.tar.bz2
external_llvm-d6f761e0eb610936a6b8495360b62696dcd85164.zip
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 'lib/MC/MCMachOStreamer.cpp')
-rw-r--r--lib/MC/MCMachOStreamer.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/MC/MCMachOStreamer.cpp b/lib/MC/MCMachOStreamer.cpp
index 0ad03273cf..316051ce01 100644
--- a/lib/MC/MCMachOStreamer.cpp
+++ b/lib/MC/MCMachOStreamer.cpp
@@ -150,6 +150,8 @@ void MCMachOStreamer::EmitValue(const MCValue &Value, unsigned Size) {
void MCMachOStreamer::EmitValueToAlignment(unsigned ByteAlignment,
int64_t Value, unsigned ValueSize,
unsigned MaxBytesToEmit) {
+ if (MaxBytesToEmit == 0)
+ MaxBytesToEmit = ByteAlignment;
new MCAlignFragment(ByteAlignment, Value, ValueSize, MaxBytesToEmit,
CurSectionData);
@@ -160,7 +162,7 @@ void MCMachOStreamer::EmitValueToAlignment(unsigned ByteAlignment,
void MCMachOStreamer::EmitValueToOffset(const MCValue &Offset,
unsigned char Value) {
- new MCOrgFragment(Offset, Value, 1, CurSectionData);
+ new MCOrgFragment(Offset, Value, CurSectionData);
}
void MCMachOStreamer::EmitInstruction(const MCInst &Inst) {