[llvm-commits] [PATCH]: PR12731: Fix llvm-objdump -arch handling

Evan Cheng evan.cheng at apple.com
Mon May 7 18:01:04 PDT 2012


Kevin, can you review this patch?

Evan

On May 3, 2012, at 8:45 PM, Meador Inge wrote:

> 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
> <pr12731.patch>_______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits




More information about the llvm-commits mailing list