summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC/MachObjectWriter.cpp
diff options
context:
space:
mode:
authorKevin Enderby <enderby@apple.com>2014-12-18 00:53:40 +0000
committerKevin Enderby <enderby@apple.com>2014-12-18 00:53:40 +0000
commitd0b6b7fb7f2ae52703aec0cd07a0d6b2ff5429ce (patch)
tree560bde978542a638df04d6c25bc2bc94c63f1ffb /llvm/lib/MC/MachObjectWriter.cpp
parentc8ee63e2d08700865b304d4d867573535a069fc6 (diff)
downloadbcm5719-llvm-d0b6b7fb7f2ae52703aec0cd07a0d6b2ff5429ce.tar.gz
bcm5719-llvm-d0b6b7fb7f2ae52703aec0cd07a0d6b2ff5429ce.zip
Add printing the LC_LINKER_OPTION load command with llvm-objdump’s -private-headers.
Also corrected the name of the load command to not end in an ’S’ as well as corrected the name of the MachO::linker_option_command struct and other places that had the word option as plural which did not match the Mac OS X headers. llvm-svn: 224485
Diffstat (limited to 'llvm/lib/MC/MachObjectWriter.cpp')
-rw-r--r--llvm/lib/MC/MachObjectWriter.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/MC/MachObjectWriter.cpp b/llvm/lib/MC/MachObjectWriter.cpp
index 577c4b75f97..d3751bd9ba5 100644
--- a/llvm/lib/MC/MachObjectWriter.cpp
+++ b/llvm/lib/MC/MachObjectWriter.cpp
@@ -418,7 +418,7 @@ void MachObjectWriter::WriteLinkeditLoadCommand(uint32_t Type,
static unsigned ComputeLinkerOptionsLoadCommandSize(
const std::vector<std::string> &Options, bool is64Bit)
{
- unsigned Size = sizeof(MachO::linker_options_command);
+ unsigned Size = sizeof(MachO::linker_option_command);
for (unsigned i = 0, e = Options.size(); i != e; ++i)
Size += Options[i].size() + 1;
return RoundUpToAlignment(Size, is64Bit ? 8 : 4);
@@ -431,10 +431,10 @@ void MachObjectWriter::WriteLinkerOptionsLoadCommand(
uint64_t Start = OS.tell();
(void) Start;
- Write32(MachO::LC_LINKER_OPTIONS);
+ Write32(MachO::LC_LINKER_OPTION);
Write32(Size);
Write32(Options.size());
- uint64_t BytesWritten = sizeof(MachO::linker_options_command);
+ uint64_t BytesWritten = sizeof(MachO::linker_option_command);
for (unsigned i = 0, e = Options.size(); i != e; ++i) {
// Write each string, including the null byte.
const std::string &Option = Options[i];
OpenPOWER on IntegriCloud