diff options
author | Lang Hames <lhames@gmail.com> | 2019-04-20 18:50:13 +0000 |
---|---|---|
committer | Lang Hames <lhames@gmail.com> | 2019-04-20 18:50:13 +0000 |
commit | c283fc5ebb8989e128d3e2b7e29affd7d6c27b96 (patch) | |
tree | 3c80fb529ccd453549f6c72a98464af3e7a32432 /llvm/lib | |
parent | bcdce5cd41207f6554e463119c0c4cb0da7eac0d (diff) | |
download | bcm5719-llvm-c283fc5ebb8989e128d3e2b7e29affd7d6c27b96.tar.gz bcm5719-llvm-c283fc5ebb8989e128d3e2b7e29affd7d6c27b96.zip |
[JITLink] Add more detail to MachO/x86-64 "unsupported relocation" errors.
The extra information here will be helpful in diagnosing errors, like the
ones currently occuring on the PPC big-endian bots. :)
llvm-svn: 358826
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/ExecutionEngine/JITLink/JITLink_MachO_x86_64.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/llvm/lib/ExecutionEngine/JITLink/JITLink_MachO_x86_64.cpp b/llvm/lib/ExecutionEngine/JITLink/JITLink_MachO_x86_64.cpp index 0e1dd236dc8..6ee633baca4 100644 --- a/llvm/lib/ExecutionEngine/JITLink/JITLink_MachO_x86_64.cpp +++ b/llvm/lib/ExecutionEngine/JITLink/JITLink_MachO_x86_64.cpp @@ -87,7 +87,11 @@ private: break; } - return make_error<JITLinkError>("Unsupported x86-64 relocation kind"); + return make_error<JITLinkError>( + "Unsupported x86-64 relocation: kind=" + formatv("{0:x1}", RI.r_type) + + ", pc_rel=" + (RI.r_pcrel ? "true" : "false") + + ", extern= " + (RI.r_extern ? "true" : "false") + + ", length=" + formatv("{0:u}", RI.r_length)); } Expected<Atom &> findAtomBySymbolIndex(const MachO::relocation_info &RI) { |