summaryrefslogtreecommitdiff
path: root/tools
Commit message (Collapse)AuthorAge
* Fix the build with gcc 4.7 and -std=c++11.Rafael Espindola2013-06-17
| | | | | | | | | | | The error message was: /home/espindola/llvm/llvm/tools/gold/gold-plugin.cpp: In function ‘ld_plugin_status cleanup_hook()’: /home/espindola/llvm/llvm/tools/gold/gold-plugin.cpp:461:30: error: cannot pass objects of non-trivially-copyable type ‘std::string {aka class std::basic_string<char>}’ through ‘...’ I will check if this was a clang or gcc issue. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184138 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert two uses of eraseFromDisk.Rafael Espindola2013-06-17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184136 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove usage of PathV1.h in FindBugs.cpp.Rafael Espindola2013-06-17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184122 91177308-0d34-0410-b5e6-96231b3b80d8
* [yaml2obj][ELF] Exit with error status on error.Sean Silva2013-06-17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184115 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't use PathV1.h in CrashDebugger.cpp.Rafael Espindola2013-06-17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184109 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't use PathV1.h in ToolRunner.h.Rafael Espindola2013-06-17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184107 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove CBE related code.Rafael Espindola2013-06-17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184106 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't use PathV1.h in ExtractFunction.cpp.Rafael Espindola2013-06-17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184102 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't use PathV1.h in tools/gold/gold-plugin.cpp.Rafael Espindola2013-06-17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184099 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't use PathV1.h in LTOCodeGenerator.cppRafael Espindola2013-06-17
| | | | | | | This patch also adds a simpler version of sys::fs::remove and a tool_output_file constructor for when we already have an open file. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184095 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't use PathV1.h in llvm-link.Rafael Espindola2013-06-17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184092 91177308-0d34-0410-b5e6-96231b3b80d8
* Move lib/Archive to tools/llvm-ar.Rafael Espindola2013-06-17
| | | | | | | | llvm-ar is the only tool that needs to write archive files. Every other tool should be able to use the lib/Object interface. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184083 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't link with the archive library programs that don't use it.Rafael Espindola2013-06-17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184081 91177308-0d34-0410-b5e6-96231b3b80d8
* [yaml2obj] Move some classes into anonymous namespaces.Sean Silva2013-06-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184025 91177308-0d34-0410-b5e6-96231b3b80d8
* [yaml2obj] Add support for sh_link via `Link` key.Sean Silva2013-06-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184022 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove the LLVM specific archive index.Rafael Espindola2013-06-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Archive files (.a) can have a symbol table indicating which object files in them define which symbols. The purpose of this symbol table is to speed up linking by allowing the linker the read only the .o files it is actually going to use instead of having to parse every object's symbol table. LLVM's archive library currently supports a LLVM specific format for such table. It is hard to see any value in that now that llvm-ld is gone: * System linkers don't use it: GNU ar uses the same plugin as the linker to create archive files with a regular index. The OS X ar creates no symbol table for IL files, I assume the linker just parses all IL files. * It doesn't interact well with archives having both IL and native objects. * We probably don't want to be responsible for yet another archive format variant. This patch then: * Removes support for creating and reading such index from lib/Archive. * Remove llvm-ranlib, since there is nothing left for it to do. We should in the future add support for regular indexes to llvm-ar for both native and IL objects. When we do that, llvm-ranlib should be reimplemented as a symlink to llvm-ar, as it is equivalent to "ar s". git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184019 91177308-0d34-0410-b5e6-96231b3b80d8
* Move PrependMainExecutablePath next to its only user.Rafael Espindola2013-06-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183980 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove unused header.Rafael Espindola2013-06-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183968 91177308-0d34-0410-b5e6-96231b3b80d8
* [yaml2obj] Add support for sh_addralign via `AddressAlign` key.Sean Silva2013-06-14
| | | | | | | For consistency, change the address in the test case from 0xDEADBEEF to 0xCAFEBABE since 0xCAFEBABE that actually has a 2-byte alignment. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183962 91177308-0d34-0410-b5e6-96231b3b80d8
* [yaml2obj] Add support for specifying raw section content.Sean Silva2013-06-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183955 91177308-0d34-0410-b5e6-96231b3b80d8
* [yaml2obj] Add sh_addr via `Address` key.Sean Silva2013-06-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183954 91177308-0d34-0410-b5e6-96231b3b80d8
* [yaml2obj] Initial ELF section support.Sean Silva2013-06-13
| | | | | | | The current functionality is extremely basic and a bit rough around the edges, but it will flesh out in future commits. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183953 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't use PathV1.h in Signals.h.Rafael Espindola2013-06-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183947 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't use PathV1.h in FileUtilities.h.Rafael Espindola2013-06-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183941 91177308-0d34-0410-b5e6-96231b3b80d8
* Avoid using PathV1.h in Program.h.Rafael Espindola2013-06-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183940 91177308-0d34-0410-b5e6-96231b3b80d8
* Have sys::FindProgramByName return a std::string.Rafael Espindola2013-06-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183928 91177308-0d34-0410-b5e6-96231b3b80d8
* Further reduce usage of sys::Path in bugpoint.Rafael Espindola2013-06-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183912 91177308-0d34-0410-b5e6-96231b3b80d8
* Try to fix the build with libstdc++ 4.4.Rafael Espindola2013-06-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183909 91177308-0d34-0410-b5e6-96231b3b80d8
* Reduce sys::Path usage in bugpoint.Rafael Espindola2013-06-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183908 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove the program class.Rafael Espindola2013-06-12
| | | | | | | It was only used to implement ExecuteAndWait and ExecuteNoWait. Expose just those two functions and make Execute and Wait implementations details. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183864 91177308-0d34-0410-b5e6-96231b3b80d8
* readobj: Dump PE/COFF optional records.Rui Ueyama2013-06-12
| | | | | | | | | | | | These records are mandatory for executables and are used by the loader. Reviewers: rafael CC: llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D939 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183852 91177308-0d34-0410-b5e6-96231b3b80d8
* Inline Path::isBitcodeFile into only use and remove it.Rafael Espindola2013-06-12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183840 91177308-0d34-0410-b5e6-96231b3b80d8
* Include PathV1.h in files that use it.Rafael Espindola2013-06-11
| | | | | | This is preparation for replacing Path.h with PathV2.h. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183782 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert another use of sys::identifyFileType.Rafael Espindola2013-06-11
| | | | | | No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183759 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix dubious type name similar to member name.Sean Silva2013-06-11
| | | | | | Should bring bots back to life. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183715 91177308-0d34-0410-b5e6-96231b3b80d8
* [yaml2obj] Initial ELF support.Sean Silva2013-06-10
| | | | | | | | | Currently, only emitting the ELF header is supported (no sections or segments). The ELFYAML code organization is broadly similar to the COFFYAML code. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183711 91177308-0d34-0410-b5e6-96231b3b80d8
* Pass a StringRef to sys::identifyFileType.Rafael Espindola2013-06-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183669 91177308-0d34-0410-b5e6-96231b3b80d8
* [llvm-symbolizer] rewrite r183213 in a more clear wayAlexey Samsonov2013-06-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183526 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach llvm-objdump with the -macho parser how to use the data in code tableKevin Enderby2013-06-06
| | | | | | | | | | | | | | | | from the LC_DATA_IN_CODE load command. And when disassembling print the data in code formatted for the kind of data it and not disassemble those bytes. I added the format specific functionality to the derived class MachOObjectFile since these tables only appears in Mach-O object files. This is my first attempt to modify the libObject stuff so if folks have better suggestions how to fit this in or suggestions on the implementation please let me know. rdar://11791371 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183424 91177308-0d34-0410-b5e6-96231b3b80d8
* Print symbol names in relocations when dumping COFF as YAML.Rafael Espindola2013-06-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183403 91177308-0d34-0410-b5e6-96231b3b80d8
* Add BinaryRef binary_size() method.Sean Silva2013-06-05
| | | | | | This avoids making assumptions about the data representation. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183349 91177308-0d34-0410-b5e6-96231b3b80d8
* Add writeAsBinary(raw_ostream &) method to BinaryRef.Sean Silva2013-06-05
| | | | | | | | | | | Previously, yaml2coff.cpp had a writeHexData static helper function to do this, but it is generally useful functionality. Also, validate hex strings up-front to avoid running having to handle errors "deep inside" the yaml2obj code (it also gives better diagnostics than it used to). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183345 91177308-0d34-0410-b5e6-96231b3b80d8
* yaml2obj: split out COFF logic into separate fileSean Silva2013-06-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183335 91177308-0d34-0410-b5e6-96231b3b80d8
* yaml2obj: add -format=<fmt> to choose input YAML interpretationSean Silva2013-06-05
| | | | | | | | | | | | See the comment in yaml2obj.cpp for why this is currently needed. Eventually we can get rid of this, but for now it is needed in order to make forward progress with adding ELF support, and should be straightforward to remove later. Also, preserve the default of COFF, to avoid breaking existing tests. This policy can easily be changed later though. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183332 91177308-0d34-0410-b5e6-96231b3b80d8
* Move BinaryRef to a new include/llvm/Object/YAML.h file.Rafael Espindola2013-06-05
| | | | | | It will be used for ELF dumping too. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183287 91177308-0d34-0410-b5e6-96231b3b80d8
* Handle relocations that don't point to symbols.Rafael Espindola2013-06-05
| | | | | | | | In ELF (as in MachO), not all relocations point to symbols. Represent this properly by using a symbol_iterator instead of a SymbolRef. Update llvm-readobj ELF's dumper to handle relocatios without symbols. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183284 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove "-Wl,-seg1addr -Wl,0xE0000000" from link options.Bob Wilson2013-06-04
| | | | | | | | Specifying the load address for Darwin i386 dylibs was a performance optimization for dyld that is not relevant for x86_64 or arm. We can just remove this now. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183230 91177308-0d34-0410-b5e6-96231b3b80d8
* [llvm-symbolizer] Avoid calling slow getSymbolSize for Mach-O files. Assume ↵Alexey Samsonov2013-06-04
| | | | | | that symbols with zero size are in fact large enough. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183213 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove dead code.Rafael Espindola2013-06-03
| | | | | | Thanks to Sean Silva for noticing it! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183148 91177308-0d34-0410-b5e6-96231b3b80d8
* Correct handling invalid filename in llvm-symbolizerAlexey Samsonov2013-06-03
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183102 91177308-0d34-0410-b5e6-96231b3b80d8