summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2014-04-03 23:20:02 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2014-04-03 23:20:02 +0000
commit0cc9ba116f5c2a6c37484ab4d13cca291aee6f9e (patch)
treece02a7130c81ea15ebbd8c1f84fd88b5178cdfcb
parent5ce227971ea4bda7a2a1a8104b15fd680696155d (diff)
downloadbcm5719-llvm-0cc9ba116f5c2a6c37484ab4d13cca291aee6f9e.tar.gz
bcm5719-llvm-0cc9ba116f5c2a6c37484ab4d13cca291aee6f9e.zip
Fix llvm-objdump crash.
llvm-svn: 205581
-rw-r--r--llvm/lib/Object/MachOObjectFile.cpp8
-rw-r--r--llvm/test/DebugInfo/X86/DW_AT_location-reference.ll4
2 files changed, 5 insertions, 7 deletions
diff --git a/llvm/lib/Object/MachOObjectFile.cpp b/llvm/lib/Object/MachOObjectFile.cpp
index 0f519da92fc..2bd87c970de 100644
--- a/llvm/lib/Object/MachOObjectFile.cpp
+++ b/llvm/lib/Object/MachOObjectFile.cpp
@@ -976,7 +976,7 @@ MachOObjectFile::getRelocationValueString(DataRefImpl Rel,
}
case MachO::X86_64_RELOC_SUBTRACTOR: {
DataRefImpl RelNext = Rel;
- RelNext.d.a++;
+ moveRelocationNext(RelNext);
MachO::any_relocation_info RENext = getRelocation(RelNext);
// X86_64_RELOC_SUBTRACTOR must be followed by a relocation of type
@@ -1024,7 +1024,7 @@ MachOObjectFile::getRelocationValueString(DataRefImpl Rel,
return object_error::success;
case MachO::GENERIC_RELOC_SECTDIFF: {
DataRefImpl RelNext = Rel;
- RelNext.d.a++;
+ moveRelocationNext(RelNext);
MachO::any_relocation_info RENext = getRelocation(RelNext);
// X86 sect diff's must be followed by a relocation of type
@@ -1046,7 +1046,7 @@ MachOObjectFile::getRelocationValueString(DataRefImpl Rel,
switch (Type) {
case MachO::GENERIC_RELOC_LOCAL_SECTDIFF: {
DataRefImpl RelNext = Rel;
- RelNext.d.a++;
+ moveRelocationNext(RelNext);
MachO::any_relocation_info RENext = getRelocation(RelNext);
// X86 sect diff's must be followed by a relocation of type
@@ -1085,7 +1085,7 @@ MachOObjectFile::getRelocationValueString(DataRefImpl Rel,
printRelocationTargetName(this, RE, fmt);
DataRefImpl RelNext = Rel;
- RelNext.d.a++;
+ moveRelocationNext(RelNext);
MachO::any_relocation_info RENext = getRelocation(RelNext);
// ARM half relocs must be followed by a relocation of type
diff --git a/llvm/test/DebugInfo/X86/DW_AT_location-reference.ll b/llvm/test/DebugInfo/X86/DW_AT_location-reference.ll
index 4bdfd6fdfc8..6c5e32c093d 100644
--- a/llvm/test/DebugInfo/X86/DW_AT_location-reference.ll
+++ b/llvm/test/DebugInfo/X86/DW_AT_location-reference.ll
@@ -1,8 +1,6 @@
; RUN: llc -O1 -filetype=obj -mtriple=x86_64-apple-darwin < %s > %t
; RUN: llvm-dwarfdump %t | FileCheck %s
-; FIXME: llvm-objdump is failing with an error when parsing some relocations
-; here, though it doesn't seem to adversely affect the test
-; RUN: not llvm-objdump -r %t | FileCheck -check-prefix=DARWIN %s
+; RUN: llvm-objdump -r %t | FileCheck -check-prefix=DARWIN %s
; RUN: llc -O1 -filetype=obj -mtriple=x86_64-pc-linux-gnu < %s > %t
; RUN: llvm-dwarfdump %t | FileCheck %s
; RUN: llvm-objdump -r %t | FileCheck -check-prefix=LINUX %s
OpenPOWER on IntegriCloud