summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-size/llvm-size.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Run clang-format on llvm-size.cpp to tidy things up. No functional changes.Kevin Enderby2014-07-011-109/+92
| | | | llvm-svn: 212141
* Add the -arch flag support to llvm-size like what was done to llvm-nmKevin Enderby2014-07-011-2/+207
| | | | | | | | | to select the slice out of a Mach-O universal file. This also includes support for -arch all, selecting the host architecture by default from a universal file and checking if -arch is used with a standard Mach-O it matches that architecture. llvm-svn: 212108
* Convert a few methods to use ErrorOr.Rafael Espindola2014-06-231-2/+2
| | | | | | | It used to be inconvenient to mix ErrorOr and UniquePtr, but with c++11 they work OK together. llvm-svn: 211532
* Added the -m option as an alias for -format=darwin to llvm-nm and llvm-sizeKevin Enderby2014-06-201-0/+1
| | | | | | which is what the darwin tools use for the Mach-O format output. llvm-svn: 211326
* Change the output of llvm-nm and llvm-size for Mach-O universal files (akaKevin Enderby2014-06-191-4/+15
| | | | | | | | | | fat files) to print “ (for architecture XYZ)” for fat files with more than one architecture to be like what the darwin tools do for fat files. Also clean up the Mach-O printing of archive membernames in llvm-nm to use the darwin form of "libx.a(foo.o)". llvm-svn: 211316
* Teach llvm-size to know about Mach-O universal files (aka fat files) andKevin Enderby2014-06-181-0/+52
| | | | | | | | | | fat files containing archives. Also fix a bug in MachOUniversalBinary::ObjectForArch::ObjectForArch() where it needed a >= when comparing the Index with the number of objects in a fat file. As the index starts at 0. llvm-svn: 211230
* Add "-format darwin" to llvm-size to be like darwin's size(1) -m output, andKevin Enderby2014-06-171-25/+222
| | | | | | | | | | | | | | | and the -l option for the long format. Also when the object is a Mach-O file and the format is berkeley produce output like darwin’s default size(1) summary berkeley derived output. Like System V format, there are also some small changes in how and where the file names and archive member names are printed for darwin and Mach-O. Like the changes to llvm-nm these are the first steps in seeing if it is possible to make llvm-size produce the same output as darwin's size(1). llvm-svn: 211117
* Convert the Archive API to use ErrorOr.Rafael Espindola2014-06-161-4/+4
| | | | | | | | | Now that we have c++11, even things like ErrorOr<std::unique_ptr<...>> are easy to use. No intended functionality change. llvm-svn: 211033
* Remove 'using std::error_code' from tools.Rafael Espindola2014-06-131-4/+3
| | | | llvm-svn: 210876
* Don't use 'using std::error_code' in include/llvm.Rafael Espindola2014-06-121-0/+1
| | | | | | This should make sure that most new uses use the std prefix. llvm-svn: 210835
* Remove system_error.h.Rafael Espindola2014-06-121-1/+1
| | | | | | | This is a minimal change to remove the header. I will remove the occurrences of "using std::error_code" in a followup patch. llvm-svn: 210803
* [C++] Use 'nullptr'. Tools edition.Craig Topper2014-04-251-1/+1
| | | | llvm-svn: 207176
* [C++11] Use ObjectFile::sections() in commandline llvm toolsAlexey Samsonov2014-03-131-22/+25
| | | | llvm-svn: 203802
* Replace OwningPtr<T> with std::unique_ptr<T>.Ahmed Charles2014-03-061-2/+2
| | | | | | | | | | This compiles with no changes to clang/lld/lldb with MSVC and includes overloads to various functions which are used by those projects and llvm which have OwningPtr's as parameters. This should allow out of tree projects some time to move. There are also no changes to libs/Target, which should help out of tree targets have time to move, if necessary. llvm-svn: 203083
* Change the begin and end methods in ObjectFile to match the style guide.Rafael Espindola2014-02-101-3/+3
| | | | llvm-svn: 201108
* Simplify the handling of iterators in ObjectFile.Rafael Espindola2014-01-301-19/+6
| | | | | | | | | | | | None of the object file formats reported error on iterator increment. In retrospect, that is not too surprising: no object format stores symbols or sections in a linked list or other structure that requires chasing pointers. As a consequence, all error checking can be done on begin() and end(). This reduces the text segment of bin/llvm-readobj in my machine from 521233 to 518526 bytes. llvm-svn: 200442
* Rename these methods to match the style guide.Rafael Espindola2014-01-211-2/+2
| | | | llvm-svn: 199751
* Return an ErrorOr<Binary *> from createBinary.Rafael Espindola2014-01-151-3/+4
| | | | | | | | I did write a version returning ErrorOr<OwningPtr<Binary> >, but it is too cumbersome to use without std::move. I will keep the patch locally and submit when we switch to c++11. llvm-svn: 199326
* Sort the #include lines for tools/...Chandler Carruth2012-12-041-1/+1
| | | | | | | | Again, tools are trickier to pick the main module header for than library source files. I've started to follow the pattern of using LLVMContext.h when it is included as a stub for program source files. llvm-svn: 169252
* Add more PRI.64 macros for MSVC and use them throughout the codebase.Benjamin Kramer2011-11-051-5/+5
| | | | llvm-svn: 143799
* Fix a few changes I missed.Michael J. Spencer2011-10-071-9/+9
| | | | llvm-svn: 141392
* Fix build failures better.Andrew Trick2011-09-291-5/+3
| | | | llvm-svn: 140758
* Fix build failure.Daniel Dunbar2011-09-291-2/+4
| | | | llvm-svn: 140755
* llvm-size: Apply Chris's code review fixes.Michael J. Spencer2011-09-291-46/+59
| | | | | | | This doesn't use formated_raw_ostream because it doesn't support the functionality needed. llvm-svn: 140751
* Fix cast.Michael J. Spencer2011-09-281-1/+1
| | | | llvm-svn: 140726
* Add llvm-size.Michael J. Spencer2011-09-281-0/+298
llvm-svn: 140722
OpenPOWER on IntegriCloud