mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-27 06:35:30 +00:00
Fix llvm-objdump crash.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205581 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
67c46d286f
commit
8cb805cf30
@ -976,7 +976,7 @@ MachOObjectFile::getRelocationValueString(DataRefImpl Rel,
|
|||||||
}
|
}
|
||||||
case MachO::X86_64_RELOC_SUBTRACTOR: {
|
case MachO::X86_64_RELOC_SUBTRACTOR: {
|
||||||
DataRefImpl RelNext = Rel;
|
DataRefImpl RelNext = Rel;
|
||||||
RelNext.d.a++;
|
moveRelocationNext(RelNext);
|
||||||
MachO::any_relocation_info RENext = getRelocation(RelNext);
|
MachO::any_relocation_info RENext = getRelocation(RelNext);
|
||||||
|
|
||||||
// X86_64_RELOC_SUBTRACTOR must be followed by a relocation of type
|
// X86_64_RELOC_SUBTRACTOR must be followed by a relocation of type
|
||||||
@ -1024,7 +1024,7 @@ MachOObjectFile::getRelocationValueString(DataRefImpl Rel,
|
|||||||
return object_error::success;
|
return object_error::success;
|
||||||
case MachO::GENERIC_RELOC_SECTDIFF: {
|
case MachO::GENERIC_RELOC_SECTDIFF: {
|
||||||
DataRefImpl RelNext = Rel;
|
DataRefImpl RelNext = Rel;
|
||||||
RelNext.d.a++;
|
moveRelocationNext(RelNext);
|
||||||
MachO::any_relocation_info RENext = getRelocation(RelNext);
|
MachO::any_relocation_info RENext = getRelocation(RelNext);
|
||||||
|
|
||||||
// X86 sect diff's must be followed by a relocation of type
|
// X86 sect diff's must be followed by a relocation of type
|
||||||
@ -1046,7 +1046,7 @@ MachOObjectFile::getRelocationValueString(DataRefImpl Rel,
|
|||||||
switch (Type) {
|
switch (Type) {
|
||||||
case MachO::GENERIC_RELOC_LOCAL_SECTDIFF: {
|
case MachO::GENERIC_RELOC_LOCAL_SECTDIFF: {
|
||||||
DataRefImpl RelNext = Rel;
|
DataRefImpl RelNext = Rel;
|
||||||
RelNext.d.a++;
|
moveRelocationNext(RelNext);
|
||||||
MachO::any_relocation_info RENext = getRelocation(RelNext);
|
MachO::any_relocation_info RENext = getRelocation(RelNext);
|
||||||
|
|
||||||
// X86 sect diff's must be followed by a relocation of type
|
// X86 sect diff's must be followed by a relocation of type
|
||||||
@ -1085,7 +1085,7 @@ MachOObjectFile::getRelocationValueString(DataRefImpl Rel,
|
|||||||
printRelocationTargetName(this, RE, fmt);
|
printRelocationTargetName(this, RE, fmt);
|
||||||
|
|
||||||
DataRefImpl RelNext = Rel;
|
DataRefImpl RelNext = Rel;
|
||||||
RelNext.d.a++;
|
moveRelocationNext(RelNext);
|
||||||
MachO::any_relocation_info RENext = getRelocation(RelNext);
|
MachO::any_relocation_info RENext = getRelocation(RelNext);
|
||||||
|
|
||||||
// ARM half relocs must be followed by a relocation of type
|
// ARM half relocs must be followed by a relocation of type
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
; RUN: llc -O1 -filetype=obj -mtriple=x86_64-apple-darwin < %s > %t
|
; RUN: llc -O1 -filetype=obj -mtriple=x86_64-apple-darwin < %s > %t
|
||||||
; RUN: llvm-dwarfdump %t | FileCheck %s
|
; RUN: llvm-dwarfdump %t | FileCheck %s
|
||||||
; FIXME: llvm-objdump is failing with an error when parsing some relocations
|
; RUN: llvm-objdump -r %t | FileCheck -check-prefix=DARWIN %s
|
||||||
; here, though it doesn't seem to adversely affect the test
|
|
||||||
; RUN: not llvm-objdump -r %t | FileCheck -check-prefix=DARWIN %s
|
|
||||||
; RUN: llc -O1 -filetype=obj -mtriple=x86_64-pc-linux-gnu < %s > %t
|
; RUN: llc -O1 -filetype=obj -mtriple=x86_64-pc-linux-gnu < %s > %t
|
||||||
; RUN: llvm-dwarfdump %t | FileCheck %s
|
; RUN: llvm-dwarfdump %t | FileCheck %s
|
||||||
; RUN: llvm-objdump -r %t | FileCheck -check-prefix=LINUX %s
|
; RUN: llvm-objdump -r %t | FileCheck -check-prefix=LINUX %s
|
||||||
|
Loading…
Reference in New Issue
Block a user