summaryrefslogtreecommitdiffstats
path: root/llvm/tools
Commit message (Collapse)AuthorAgeFilesLines
...
* Change the default input for llvm-nm to be a.out instead of standard inputKevin Enderby2014-06-231-1/+1
| | | | | | | | | to match llvm-size and other UNIX systems for their nm(1). Tweak test cases that used llvm-nm with standard input to add a "-" to indicate that and add a test case to check the default of a.out for llvm-nm. llvm-svn: 211529
* Fix some double printing of filenames for archives in llvm-nm whenKevin Enderby2014-06-201-10/+13
| | | | | | | | the tool is given multiple files. Also fix the same issue with Mach-O universal files. And fix the newline spacing to separate the output in these cases. llvm-svn: 211405
* Small clanups:Rafael Espindola2014-06-201-36/+22
| | | | | | | Use static instead of anonymous namespace. Delete write only variables. llvm-svn: 211335
* Added the -m option as an alias for -format=darwin to llvm-nm and llvm-sizeKevin Enderby2014-06-202-0/+4
| | | | | | which is what the darwin tools use for the Mach-O format output. llvm-svn: 211326
* The gold plugin doesn't need disassemblers.Rafael Espindola2014-06-191-1/+0
| | | | | | | | Back in r128440 tools/LTO started exporting the disassembler interface. It was never clear why, but whatever the reason I am pretty sure it doesn't hold for tools/gold. llvm-svn: 211325
* Set gold plugin options in a sane order.Rafael Espindola2014-06-191-12/+12
| | | | | | | | | | | This fixes the processing of --plugin-opt=-jump-table-type=arity. Nice properties: * We call InitTargetOptionsFromCodeGenFlags once. * We call parseCodeGenDebugOptions once. * It works :-) llvm-svn: 211322
* Fix the output of llvm-nm for Mach-O files to use the characters ‘d’ and ↵Kevin Enderby2014-06-191-0/+4
| | | | | | | | ‘b’ for data and bss symbols instead of the generic ’s’ for a symbol in a section. llvm-svn: 211321
* Simplify. No functionality change.Rafael Espindola2014-06-191-2/+1
| | | | | | Thanks to Alp Toker for noticing it. llvm-svn: 211320
* Reduce indentation. No functionality change.Rafael Espindola2014-06-191-18/+18
| | | | llvm-svn: 211318
* Change the output of llvm-nm and llvm-size for Mach-O universal files (akaKevin Enderby2014-06-192-8/+33
| | | | | | | | | | 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
* Use lib/LTO directly in the gold plugin.Rafael Espindola2014-06-192-35/+65
| | | | | | | | | | | | | | | | | | | | The tools/lto API is not the best choice for implementing a gold plugin. Among other issues: * It is an stable ABI. Old errors stay and we have to be really careful before adding new features. * It has to support two fairly different linkers: gold and ld64. * We end up with a plugin that depends on a shared lib, something quiet unusual in LLVM land. * It hides LLVM. For some features in the gold plugin it would be really nice to be able to just get a Module or a GlobalValue. This change is intended to be a very direct translation from the C API. It will just enable other fixes and cleanups. Tested with a LTO bootstrap on linux. llvm-svn: 211315
* Remove an incorrect fixme.Rafael Espindola2014-06-191-2/+0
| | | | | | | dynamic-no-pic is just another output type. If gnu ld gets support for MachO, it should also add something like LDPO_DYN_NO_PIC to the plugin interface. llvm-svn: 211305
* Remove unused includes following r211294Alp Toker2014-06-191-2/+0
| | | | llvm-svn: 211297
* Use the c++ APIs.Rafael Espindola2014-06-191-6/+7
| | | | | | No functionality change. llvm-svn: 211294
* Move -dwarf-version to an MC level command line option so it'sEric Christopher2014-06-191-7/+7
| | | | | | | used by all of the MC level tools and codegen. Fix up all uses in the compiler to use this and set it on the context accordingly. llvm-svn: 211257
* 80-column fixups.Eric Christopher2014-06-191-5/+10
| | | | llvm-svn: 211255
* 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 a symbols() range and use a range loop.Rafael Espindola2014-06-181-5/+3
| | | | llvm-svn: 211222
* Simplify code.Rafael Espindola2014-06-181-10/+1
| | | | | | We can delete the objects earlier now that we are copying the names to a buffer. llvm-svn: 211221
* [llvm-readobj] Fix member functions name style.Simon Atanasyan2014-06-181-13/+13
| | | | llvm-svn: 211152
* [llvm-readobj] Fix compile error.Simon Atanasyan2014-06-181-1/+1
| | | | llvm-svn: 211151
* [llvm-readobj][ELF] New `-mips-plt-got` command line option to outputSimon Atanasyan2014-06-184-0/+241
| | | | | | | | MIPS GOT section. Patch reviewed by Rafael Espindola. llvm-svn: 211150
* 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-165-29/+33
| | | | | | | | | Now that we have c++11, even things like ErrorOr<std::unique_ptr<...>> are easy to use. No intended functionality change. llvm-svn: 211033
* Finishing touch for the std::error_code transition.Rafael Espindola2014-06-133-5/+8
| | | | | | | | | | | While std::error_code itself seems to work OK in all platforms, there are few annoying differences with regards to the std::errc enumeration. This patch adds a simple llvm enumeration, which will hopefully avoid build breakages in other platforms and surprises as we get more uses of std::error_code. llvm-svn: 210920
* opt: Initialize asm printersTobias Grosser2014-06-131-0/+1
| | | | | | | | | | | | | | Without initializing the assembly printers a shared library build of opt is linked with these libraries whereas for a static build these libraries are dead code eliminated. This is unfortunate for plugins in case they want to use them, as they neither can rely on opt to provide this functionality nor can they link the printers in themselves as this breaks with a shared object build of opt. This patch calls InitializeAllAsmPrinters() from opt, which increases the static binary size from 50MB -> 52MB on my system (all backends compiled) and causes no measurable increase in the time needed to run 'make check'. llvm-svn: 210914
* Remove unused and odd code.Rafael Espindola2014-06-132-18/+0
| | | | | | | | This code was never being used and any use of it would look fairly strange. For example, it would try to map a object_error::parse_failed to std::errc::invalid_argument. llvm-svn: 210912
* Remove 'using std::error_code' from tools.Rafael Espindola2014-06-1333-194/+167
| | | | llvm-svn: 210876
* Remove all uses of 'using std::error_code' from headers.Rafael Espindola2014-06-1317-33/+35
| | | | llvm-svn: 210866
* Don't use 'using std::error_code' in include/llvm.Rafael Espindola2014-06-1230-0/+30
| | | | | | This should make sure that most new uses use the std prefix. llvm-svn: 210835
* Remove system_error.h.Rafael Espindola2014-06-1220-26/+25
| | | | | | | 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
* Replace llvm::error_code with std::error_code.Rafael Espindola2014-06-121-4/+4
| | | | llvm-svn: 210783
* Don't import make_error_code into the llvm namespace.Rafael Espindola2014-06-121-1/+1
| | | | llvm-svn: 210772
* Don't import error_category into the llvm namespace.Rafael Espindola2014-06-124-6/+6
| | | | llvm-svn: 210733
* Don't import error_condition into the llvm namespace.Rafael Espindola2014-06-122-6/+9
| | | | llvm-svn: 210731
* llvm-mc: Add option for prefering hex format disassembly.Jim Grosbach2014-06-111-9/+9
| | | | | | | | | Previously there was a separate mode entirely (--hdis vs. --disassemble). It makes a bit more sense for the immediate printing style to be a flag for --disassmeble rather than an entirely different thing. llvm-svn: 210700
* Use std::error_code instead of llvm::error_code.Rafael Espindola2014-06-1110-16/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The idea of this patch is to turn llvm/Support/system_error.h into a transitional header that just brings in the erorr_code api to the llvm namespace. I will remove it shortly afterwards. The cases where the general idea needed some tweaking: * std::errc is a namespace in msvc, so we cannot use "using std::errc". I could add an #ifdef, but there were not that many uses, so I just added std:: to them in this patch. * Template specialization had to be moved to the std namespace in this patch set already. * The msvc implementation of default_error_condition doesn't seem to provide the same transformations as we need. Not too surprising since the standard doesn't actually say what "equivalent" means. I fixed the problem by keeping our old mapping and using it at error_code construction time. Despite these shortcomings I think this is still a good thing. Some reasons: * The different implementations of system_error might improve over time. * It removes 925 lines of code from llvm already. * It removes 6313 bytes from the text segment of the clang binary when it is built with gcc and 2816 bytes when building with clang and libstdc++. llvm-svn: 210687
* Use an enum class.Rafael Espindola2014-06-112-22/+13
| | | | llvm-svn: 210623
* Use an enum class.Rafael Espindola2014-06-112-18/+9
| | | | llvm-svn: 210620
* Mark a few functions noexcept.Rafael Espindola2014-06-102-4/+4
| | | | | | This reduces the difference between std::error_code and llvm::error_code. llvm-svn: 210591
* [llvm-readobj][ELF] Factor out the code retrieve ELF symbol informationSimon Atanasyan2014-06-101-35/+50
| | | | | | | | (section name, section index, full name) into the separate functions. No functional changes. llvm-svn: 210509
* tools: add a high level explanation for WoA EH dataSaleem Abdulrasool2014-06-071-21/+81
| | | | | | | | | | | | Add a brief explanation of the data section layout for the unwind data that the Windows on ARM EH models. This is simply to provide a rough idea of the layout of the code involved in the decoding of the unwinding. Details on the involved data structures are available in the associated support header. The bulk of it is related to printing out the byte-code to help validate generation of WoA EH. No functional change. llvm-svn: 210397
* [yaml2obj][obj2yaml] Support ELF symbol's visibility flags ↵Simon Atanasyan2014-06-062-0/+2
| | | | | | (default/hidden/protected). llvm-svn: 210316
* Add "-format darwin" to llvm-nm to be like darwin's nm(1) -m output.Kevin Enderby2014-06-051-4/+176
| | | | | | | | | | | | | | | This is a first step in seeing if it is possible to make llvm-nm produce the same output as darwin's nm(1). Darwin's default format is bsd but its -m output prints the longer Mach-O specific details. For now I added the "-format darwin" to do this (whos name may need to change in the future). As there are other Mach-O specific flags to nm(1) which I'm hoping to add some how in the future. But I wanted to see if I could get the correct output for -m flag using llvm-nm and the libObject interfaces. I got this working but would love to hear what others think about this approach to getting object/format specific details printed with llvm-nm. llvm-svn: 210285
* lld (build with configur and make) Enable buildIain Sandoe2014-06-051-3/+3
| | | | | | | r210177 added Makefiles to the lld project. This revision enables the automatic build of lld when the sources are found in tools/lld. llvm-svn: 210245
* tools: fix parenthesis warning from GCCSaleem Abdulrasool2014-06-041-1/+1
| | | | | | Add parenthesis as suggested by GCC. llvm-svn: 210194
* tools: fix silly typo in llvm-readobjSaleem Abdulrasool2014-06-041-1/+1
| | | | | | | Case insensitive case preserving file systems are not a good choice for development. llvm-svn: 210193
* tools: initial implementation of WoA EH decodingSaleem Abdulrasool2014-06-044-0/+812
| | | | | | | | | | | | | Add support to llvm-readobj to decode Windows ARM Exception Handling data. This uses the previously added datastructures to decode the information into a format that can be used by tests. This is a necessary step to add support for emitting Windows on ARM exception handling information. A fair amount of formatting inspiration is drawn from the Win64 EH printer as well as the ARM EHABI printer. This allows for a reasonably thorough look into the encoded data. llvm-svn: 210192
* tools: introduce StreamWriter::printBooleanSaleem Abdulrasool2014-06-041-0/+4
| | | | | | | Add a helper print method to print a boolean value as "Yes" or "No". This is intended to be used by the Windows ARM EH printer. llvm-svn: 210191
* [Object][ELF] Range-based loop simplification.Simon Atanasyan2014-06-041-13/+10
| | | | | | No functional changes. llvm-svn: 210164
OpenPOWER on IntegriCloud