[llvm-commits] [PATCH]: PR12731: Fix llvm-objdump -arch handling
Meador Inge
meadori at gmail.com
Thu May 3 20:45:18 PDT 2012
Hi All,
While investigating PR12729 I noticed that 'x86' and 'x86-64' are *not*
accepted as valid architecture names:
$ llvm-objdump -arch=x86 -disassemble test.o
test.o: file format Mach-O 64-bit x86-64
Disassembly of section __TEXT,__text:error: no assembly info for target
x86-unknown-unknown
$ llvm-objdump -arch=x86-64 -disassemble test.o
test.o: file format Mach-O 64-bit x86-64
Disassembly of section __TEXT,__text:error: no assembly info for target
x86-64-unknown-unknown
This is due to the logic in 'llvm-objdump.cpp:GetTarget' not mapping
the architecture
type from the LLVM name like 'llc' and 'llvm-mc' do. The attached
patch fixes this.
Since we need essentially the same logic in 'llc', 'llvm-mc', and
'llvm-objdump' I
refactored the logic into a new support function.
OK?
P.S. If it is OK, then can someone please commit for me? I don't
have commit rights.
-- Meador
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr12731.patch
Type: application/octet-stream
Size: 8592 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120503/3223656f/attachment.obj>
More information about the llvm-commits
mailing list