summaryrefslogtreecommitdiffstats
path: root/llvm/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
commitb1068e4fe3f0674857332049b9d6335b258d42b8 (patch)
tree96b488526b8448b0599c31423f7847c3008a7cc8 /llvm/lib/MC/MCMachOStreamer.cpp
parent4abcccb965bc34961c5814227aba65a2a4a8d792 (diff)
downloadbcm5719-llvm-b1068e4fe3f0674857332049b9d6335b258d42b8.tar.gz
bcm5719-llvm-b1068e4fe3f0674857332049b9d6335b258d42b8.zip
llvm-mc/Mach-O: Support .o emission for .org and .align.
llvm-svn: 79684
Diffstat (limited to 'llvm/lib/MC/MCMachOStreamer.cpp')
-rw-r--r--llvm/lib/MC/MCMachOStreamer.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/MC/MCMachOStreamer.cpp b/llvm/lib/MC/MCMachOStreamer.cpp
index 0ad03273cf0..316051ce01d 100644
--- a/llvm/lib/MC/MCMachOStreamer.cpp
+++ b/llvm/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) {
OpenPOWER on IntegriCloud