[llvm] r220518 - MachODump.cpp: fix MSVC build
Hans Wennborg
hans at hanshq.net
Thu Oct 23 14:59:17 PDT 2014
Author: hans
Date: Thu Oct 23 16:59:17 2014
New Revision: 220518
URL: http://llvm.org/viewvc/llvm-project?rev=220518&view=rev
Log:
MachODump.cpp: fix MSVC build
Modified:
llvm/trunk/tools/llvm-objdump/MachODump.cpp
Modified: llvm/trunk/tools/llvm-objdump/MachODump.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-objdump/MachODump.cpp?rev=220518&r1=220517&r2=220518&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-objdump/MachODump.cpp (original)
+++ llvm/trunk/tools/llvm-objdump/MachODump.cpp Thu Oct 23 16:59:17 2014
@@ -821,7 +821,7 @@ const char *get_objc2_64bit_class_name(u
const char *symbol_name = get_symbol_64(offset, S, info, n_value);
if (symbol_name == nullptr)
return nullptr;
- const char *class_name = rindex(symbol_name, '$');
+ const char *class_name = strrchr(symbol_name, '$');
if (class_name != nullptr && class_name[1] == '_' && class_name[2] != '\0')
return class_name + 2;
else
@@ -978,7 +978,7 @@ const char *GuessLiteralPointer(uint64_t
const char *name = get_dyld_bind_info_symbolname(ReferenceValue, info);
if (name != nullptr) {
*ReferenceType = LLVMDisassembler_ReferenceType_Out_Objc_Class_Ref;
- const char *class_name = rindex(name, '$');
+ const char *class_name = strrchr(name, '$');
if (class_name != nullptr && class_name[1] == '_' &&
class_name[2] != '\0') {
info->class_name = class_name + 2;
@@ -1074,8 +1074,8 @@ const char *SymbolizerSymbolLookUp(void
}
const char *SymbolName = nullptr;
- if (ReferenceValue != 0xffffffffffffffffLLU &&
- ReferenceValue != 0xfffffffffffffffeLLU) {
+ if (ReferenceValue != 0xffffffffffffffffULL &&
+ ReferenceValue != 0xfffffffffffffffeULL) {
StringRef name = info->AddrMap->lookup(ReferenceValue);
if (!name.empty())
SymbolName = name.data();
More information about the llvm-commits
mailing list