[all-commits] [llvm/llvm-project] 25fdcb: [llvm-size] Fix missing file name for darwin outpu...

Shivam Gupta via All-commits all-commits at lists.llvm.org
Tue Aug 30 08:32:34 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 25fdcb8e6ce362d2a5e9a2f113d744d2f68d3388
      https://github.com/llvm/llvm-project/commit/25fdcb8e6ce362d2a5e9a2f113d744d2f68d3388
  Author: Shivam Gupta <shivam98.tkg at gmail.com>
  Date:   2022-08-30 (Tue, 30 Aug 2022)

  Changed paths:
    M llvm/test/tools/llvm-size/archive.test
    M llvm/test/tools/llvm-size/elf-m.test
    M llvm/tools/llvm-size/llvm-size.cpp

  Log Message:
  -----------
  [llvm-size] Fix missing file name for darwin output format with non-Mach-O

llvm-size falls back to printing in Berkeley format, if --format=darwin is specified and a non-Mach-O object has been provided. However, it does not print the input filename when it should:

Before -
(base) xgupta at archlinux ~/llvm/llvm-project/build (main*) $ llvm-size ~/hello.o --format=darwin
   text	   data	    bss	    dec	    hex	filename
    291	      0	      0	    291	    123	%

After -
(base) xgupta at archlinux ~/llvm/llvm-project/build (main*) $ bin/llvm-size ~/hello.o --format=darwin
   text	   data	    bss	    dec	    hex	filename
    291	      0	      0	    291	    123	/home/xgupta/hello.o

Fix #42316

Reviewed By: jhenderson

Differential Revision: https://reviews.llvm.org/D132364




More information about the All-commits mailing list