[llvm] r217853 - [llvm-objdump] for mach-o add -bind, -lazy-bind, and -weak-bind options
Nick Kledzik
kledzik at apple.com
Tue Sep 16 19:04:46 PDT 2014
On Sep 16, 2014, at 6:25 PM, NAKAMURA Takumi <geek4civic at gmail.com> wrote:
>> + case MachO::BIND_OPCODE_SET_SYMBOL_TRAILING_FLAGS_IMM:
>> + Flags = ImmValue;
>> + SymStart = Ptr;
>> + while (*Ptr) {
>> + ++Ptr;
>> + }
>> + ++Ptr;
>
> SymbolName will contain trailing \0 in StringRef. Is it intended?
>
>> + SymbolName = StringRef(reinterpret_cast<const char*>(SymStart),
>> + Ptr-SymStart);
>> + DEBUG_WITH_TYPE(
Good catch!
In the current usage it turns out not to matter because the StringRef is converted to a const char* before being printed with format(“%s”).
I’ve fixed this in r217935.
-Nick
More information about the llvm-commits
mailing list