MC: Tidy up LOH naming a bit. NFC.

llvm-svn: 238800
This commit is contained in:
Jim Grosbach 2015-06-01 23:55:06 +00:00
parent 5bf65e0c18
commit 249af2a033
3 changed files with 9 additions and 9 deletions

View File

@ -106,7 +106,7 @@ class MCLOHDirective {
/// Emit this directive in \p OutStream using the information available /// Emit this directive in \p OutStream using the information available
/// in the given \p ObjWriter and \p Layout to get the address of the /// in the given \p ObjWriter and \p Layout to get the address of the
/// arguments within the object file. /// arguments within the object file.
void Emit_impl(raw_ostream &OutStream, const MachObjectWriter &ObjWriter, void emit_impl(raw_ostream &OutStream, const MachObjectWriter &ObjWriter,
const MCAsmLayout &Layout) const; const MCAsmLayout &Layout) const;
public: public:
@ -123,9 +123,9 @@ public:
/// Emit this directive as: /// Emit this directive as:
/// <kind, numArgs, addr1, ..., addrN> /// <kind, numArgs, addr1, ..., addrN>
void Emit(MachObjectWriter &ObjWriter, const MCAsmLayout &Layout) const { void emit(MachObjectWriter &ObjWriter, const MCAsmLayout &Layout) const {
raw_ostream &OutStream = ObjWriter.getStream(); raw_ostream &OutStream = ObjWriter.getStream();
Emit_impl(OutStream, ObjWriter, Layout); emit_impl(OutStream, ObjWriter, Layout);
} }
/// Get the size in bytes of this directive if emitted in \p ObjWriter with /// Get the size in bytes of this directive if emitted in \p ObjWriter with
@ -145,7 +145,7 @@ public:
}; };
raw_counting_ostream OutStream; raw_counting_ostream OutStream;
Emit_impl(OutStream, ObjWriter, Layout); emit_impl(OutStream, ObjWriter, Layout);
return OutStream.tell(); return OutStream.tell();
} }
}; };
@ -184,10 +184,10 @@ public:
} }
/// Emit all Linker Optimization Hint in one big table. /// Emit all Linker Optimization Hint in one big table.
/// Each line of the table is emitted by LOHDirective::Emit. /// Each line of the table is emitted by LOHDirective::emit.
void Emit(MachObjectWriter &ObjWriter, const MCAsmLayout &Layout) const { void emit(MachObjectWriter &ObjWriter, const MCAsmLayout &Layout) const {
for (const MCLOHDirective &D : Directives) for (const MCLOHDirective &D : Directives)
D.Emit(ObjWriter, Layout); D.emit(ObjWriter, Layout);
} }
void reset() { void reset() {

View File

@ -22,7 +22,7 @@ using namespace llvm;
// - Its argN. // - Its argN.
// <arg1> to <argN> are absolute addresses in the object file, i.e., // <arg1> to <argN> are absolute addresses in the object file, i.e.,
// relative addresses from the beginning of the object file. // relative addresses from the beginning of the object file.
void MCLOHDirective::Emit_impl(raw_ostream &OutStream, void MCLOHDirective::emit_impl(raw_ostream &OutStream,
const MachObjectWriter &ObjWriter, const MachObjectWriter &ObjWriter,
const MCAsmLayout &Layout) const { const MCAsmLayout &Layout) const {
encodeULEB128(Kind, OutStream); encodeULEB128(Kind, OutStream);

View File

@ -939,7 +939,7 @@ void MachObjectWriter::WriteObject(MCAssembler &Asm,
#ifndef NDEBUG #ifndef NDEBUG
unsigned Start = OS.tell(); unsigned Start = OS.tell();
#endif #endif
Asm.getLOHContainer().Emit(*this, Layout); Asm.getLOHContainer().emit(*this, Layout);
// Pad to a multiple of the pointer size. // Pad to a multiple of the pointer size.
WriteBytes("", OffsetToAlignment(LOHRawSize, is64Bit() ? 8 : 4)); WriteBytes("", OffsetToAlignment(LOHRawSize, is64Bit() ? 8 : 4));
assert(OS.tell() - Start == LOHSize); assert(OS.tell() - Start == LOHSize);