[llvm] r217935 - [Object] keep trailing '\0' out of StringRef when parsing mach-o bindings
Nick Kledzik
kledzik at apple.com
Tue Sep 16 18:51:44 PDT 2014
Author: kledzik
Date: Tue Sep 16 20:51:43 2014
New Revision: 217935
URL: http://llvm.org/viewvc/llvm-project?rev=217935&view=rev
Log:
[Object] keep trailing '\0' out of StringRef when parsing mach-o bindings
Modified:
llvm/trunk/lib/Object/MachOObjectFile.cpp
Modified: llvm/trunk/lib/Object/MachOObjectFile.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Object/MachOObjectFile.cpp?rev=217935&r1=217934&r2=217935&view=diff
==============================================================================
--- llvm/trunk/lib/Object/MachOObjectFile.cpp (original)
+++ llvm/trunk/lib/Object/MachOObjectFile.cpp Tue Sep 16 20:51:43 2014
@@ -1957,9 +1957,9 @@ void MachOBindEntry::moveNext() {
while (*Ptr) {
++Ptr;
}
- ++Ptr;
SymbolName = StringRef(reinterpret_cast<const char*>(SymStart),
Ptr-SymStart);
+ ++Ptr;
DEBUG_WITH_TYPE(
"mach-o-bind",
llvm::dbgs() << "BIND_OPCODE_SET_SYMBOL_TRAILING_FLAGS_IMM: "
More information about the llvm-commits
mailing list