summaryrefslogtreecommitdiff
path: root/tools
Commit message (Collapse)AuthorAge
* llvm-cov: Accept the long forms of gcov optionsJustin Bogner2014-01-29
| | | | | | | | | This is a bit imperfect, as these options don't show up in the help as is and single dash variants are accepted, which differs from gcov. Unfortunately, this seems to be as good as it gets with the cl::opt machinery, so it'll do as an incremental step. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200419 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm-cov: Improve help message textJustin Bogner2014-01-29
| | | | | | | | This Properly capitalizes and clarifies the help output from llvm-cov. It also puts the llvm-only / non-gcov-compatible options in their own category. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200418 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm-cov: Expect a source file as a positional parameterJustin Bogner2014-01-29
| | | | | | | | | | | Currently, llvm-cov isn't command-line compatible with gcov, which accepts a source file name as its first parameter and infers the gcno and gcda file names from that. This change keeps our -gcda and -gcno options available for convenience in overriding this behaviour, but adds the required parameter and inference behaviour as a compatible default. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200417 91177308-0d34-0410-b5e6-96231b3b80d8
* Normalize the style in llvm-nm.cpp.Rafael Espindola2014-01-29
| | | | | | | It had grown fairly inconsistent. I am about to change it quite a bit to also use the object api when handling IR files. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200374 91177308-0d34-0410-b5e6-96231b3b80d8
* Make createObjectFile's signature a bit less error prone.Rafael Espindola2014-01-29
| | | | | | | This will be better with c++11, but right now file_magic converts to bool, which makes the api really easy to misuse. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200357 91177308-0d34-0410-b5e6-96231b3b80d8
* Change MCStreamer EmitInstruction interface to take subtarget infoDavid Woodhouse2014-01-28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200345 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Put lli-child-target into the Folder "Misc".NAKAMURA Takumi2014-01-28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200297 91177308-0d34-0410-b5e6-96231b3b80d8
* Do not reference llvm-gcc from bugpointTobias Grosser2014-01-27
| | | | | | Reiterating: llvm-gcc is dead since a long time. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200220 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename IMAGE_DLL_CHARACTERISTICS_HIGH_ENTROPY_VA.Rui Ueyama2014-01-27
| | | | | | | editbin.exe and link.exe both accepts /highentropyva option to set this bit, so doing s/VIRTUAL_ADDRESS/VA/ should make sense. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200191 91177308-0d34-0410-b5e6-96231b3b80d8
* Pass a MCSubtargetInfo down to the TargetStreamer creation.Rafael Espindola2014-01-26
| | | | | | | With this the target streamers will be able to know the target features that are in use. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200135 91177308-0d34-0410-b5e6-96231b3b80d8
* COFF: Add a missing enum value for high entropy ASLR.Rui Ueyama2014-01-26
| | | | | | | | | That bit is not documented in the PE/COFF spec published by Microsoft, so we don't know the official name of it. I named this bit IMAGE_DLL_CHARACTERISTICS_HIGH_ENTROPY_VIRTUAL_ADDRESS because the bit is reported as "high entropy virtual address" by dumpbin.exe, git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200121 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm-readobj: add support for PE32+ (Windows 64 bit executable).Rui Ueyama2014-01-26
| | | | | | | | | | | | PE32+ supports 64 bit address space, but the file format remains 32 bit. So its file format is pretty similar to PE32 (32 bit executable). The differences compared to PE32 are (1) the lack of "BaseOfData" field and (2) some of its data members are 64 bit. In this patch, I added a new member function to get a PE32+ Header object to COFFObjectFile class and made llvm-readobj to use it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200117 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix "llvm-objdump -d -r" to show relocations inline for ELF filesMark Seaborn2014-01-25
| | | | | | | | | | | | | | | | | | | This fixes a regression introduced by r182908, which broke llvm-objdump's ability to display relocations inline in a disassembly dump for ELF object files. That change removed a SectionRelocMap from Object/ELF.h, which we recreate in llvm-objdump.cpp. I discovered this regression via an out-of-tree test (test/NaCl/X86/pnacl-hides-sandbox-x86-64.ll) which used llvm-objdump. Note that the "Unknown" string in the test output on i386 isn't quite right, but this appears to be a pre-existing bug. Differential Revision: http://llvm-reviews.chandlerc.com/D2559 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200090 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm-objdump: Some style cleanups to follow LLVM coding styleMark Seaborn2014-01-25
| | | | | | | | | | | | Rename "ec" to "EC", and rename some iterators. Then fix whitespace using clang-format-diff. (As requested in http://llvm-reviews.chandlerc.com/D2559) Differential Revision: http://llvm-reviews.chandlerc.com/D2594 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200053 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix c++03 build.Rafael Espindola2014-01-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200042 91177308-0d34-0410-b5e6-96231b3b80d8
* Make ObjectFile ownership of the MemoryBuffer optional.Rafael Espindola2014-01-24
| | | | | | This allows llvm-ar to mmap the input files only once. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200040 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix known typosAlp Toker2014-01-24
| | | | | | | Sweep the codebase for common typos. Includes some changes to visible function names that were misspelt. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200018 91177308-0d34-0410-b5e6-96231b3b80d8
* Report lli remote IO errors consistentlyAlp Toker2014-01-24
| | | | | | | | | This enables IO error reports in both the child and server processes. The scheme still isn't entirely satisfactory and output is jumbled but it beats having no output at all. This will hopefully unblock ARM support (PR18057). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200017 91177308-0d34-0410-b5e6-96231b3b80d8
* lli: Factor portable messaging into a new RPCChannel facilityAlp Toker2014-01-23
| | | | | | | The client and server now use a single unified low-level RPC core built around LLVM's existing cross-platform abstractions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199947 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove unused include following r199929Alp Toker2014-01-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199930 91177308-0d34-0410-b5e6-96231b3b80d8
* Replace the interim lli build fix with something cleanerAlp Toker2014-01-23
| | | | | | | | | | Eliminates the LLI_BUILDING_CHILD build hack from r199885. Also add a FIXME to remove code that tricks the tests into passing when the feature fails to work. Please don't do stuff like this, the tests exist for a reason! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199929 91177308-0d34-0410-b5e6-96231b3b80d8
* Add target analysis passes to the codegen pipeline for MCJIT.Juergen Ributzka2014-01-23
| | | | | | | | | | | This patch adds the target analysis passes (usually TargetTransformInfo) to the codgen pipeline. We also expose now the AddAnalysisPasses method through the C API, because the optimizer passes would also benefit from better target-specific cost models. Reviewed by Andrew Kaylor git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199926 91177308-0d34-0410-b5e6-96231b3b80d8
* Windows/ChildTarget.inc: LLIChildTarget::allocate() has gone since r199881.NAKAMURA Takumi2014-01-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199889 91177308-0d34-0410-b5e6-96231b3b80d8
* Interim build fix for MakefilesAlp Toker2014-01-23
| | | | | | Looks like some parts still need detangling. Let's see if this holds for now. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199885 91177308-0d34-0410-b5e6-96231b3b80d8
* Prospective Makefile build fixAlp Toker2014-01-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199882 91177308-0d34-0410-b5e6-96231b3b80d8
* Refactor lli-child-target to remove duplicated codeAlp Toker2014-01-23
| | | | | | | | | | | | | | Eliminate the copies LLVM's System mmap and cache invalidation code. These were slowly drifting away from the original version, and moreover the copied code was a dead end in terms of portability. We now statically link to Support but in practice with stripping this adds next to no weight to the resultant binary. Also avoid installing lli-child-target to the user's $PATH. It's not meant to be run directly. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199881 91177308-0d34-0410-b5e6-96231b3b80d8
* Tweak r199835 to use can_execute() instead of exists()Alp Toker2014-01-22
| | | | | | | The execution code path crashes if it can't execute the binary so we might as well take precautions here. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199844 91177308-0d34-0410-b5e6-96231b3b80d8
* Eliminate inappropriate use of FindProgramByName() from lliAlp Toker2014-01-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199835 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't open or fstat files twice in llvm-ar.Rafael Espindola2014-01-22
| | | | | | We still read/mmap them twice, but the fix for that is a bit more complex. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199815 91177308-0d34-0410-b5e6-96231b3b80d8
* Pass the computed magic to createBinary and createObjectFile if available.Rafael Espindola2014-01-22
| | | | | | | identify_magic is not free, so we should avoid calling it twice. The argument also makes it cheap for createBinary to just forward to createObjectFile. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199813 91177308-0d34-0410-b5e6-96231b3b80d8
* Whitespace.NAKAMURA Takumi2014-01-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199785 91177308-0d34-0410-b5e6-96231b3b80d8
* Change createObjectFile to return an ErrorOr.Rafael Espindola2014-01-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199776 91177308-0d34-0410-b5e6-96231b3b80d8
* Be a bit more consistent about using ErrorOr when constructing Binary objects.Rafael Espindola2014-01-21
| | | | | | | | | | | | | | | | | | | | | | | The constructors of classes deriving from Binary normally take an error_code as an argument to the constructor. My original intent was to change them to have a trivial constructor and move the initial parsing logic to a static method returning an ErrorOr. I changed my mind because: * A constructor with an error_code out parameter is extremely convenient from the implementation side. We can incrementally construct the object and give up when we find an error. * It is very efficient when constructing on the stack or when there is no error. The only inefficient case is where heap allocating and an error is found (we have to free the memory). The result is that this is a much smaller patch. It just standardizes the create* helpers to return an ErrorOr. Almost no functionality change: The only difference is that this found that we were trying to read past the end of COFF import library but ignoring the error. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199770 91177308-0d34-0410-b5e6-96231b3b80d8
* Adding new LTO APIs to parse metadata nodes and extract linker options andYunzhong Gao2014-01-21
| | | | | | | | | | dependent libraries from a bitcode module. Differential Revision: http://llvm-reviews.chandlerc.com/D2343 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199759 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename these methods to match the style guide.Rafael Espindola2014-01-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199751 91177308-0d34-0410-b5e6-96231b3b80d8
* tools: use 64-bit print specifierSaleem Abdulrasool2014-01-21
| | | | | | | Try to repair the ARM Cortex-A15 buildbot by using a more appropriate conversion specifier. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199711 91177308-0d34-0410-b5e6-96231b3b80d8
* tools: support decoding ARM EHABI opcodes in readobjSaleem Abdulrasool2014-01-21
| | | | | | | | | | | | | | Add support to llvm-readobj to decode the actual opcodes. The ARM EHABI opcodes are a variable length instruction set that describe the operations required for properly unwinding stack frames. The primary motivation for this change is to ease the creation of tests for the ARM EHABI object emission as well as the unwinding directive handling in the ARM IAS. Thanks to Logan Chien for an extra test case! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199708 91177308-0d34-0410-b5e6-96231b3b80d8
* Whitespace.NAKAMURA Takumi2014-01-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199667 91177308-0d34-0410-b5e6-96231b3b80d8
* [PM] Wire up the Verifier for the new pass manager and connect it to theChandler Carruth2014-01-20
| | | | | | | | | | | | | | | | | | | | | | various opt verifier commandline options. Mostly mechanical wiring of the verifier to the new pass manager. Exercises one of the more unusual aspects of it -- a pass can be either a module or function pass interchangably. If this is ever problematic, we can make things more constrained, but for things like the verifier where there is an "obvious" applicability at both levels, it seems convenient. This is the next-to-last piece of basic functionality left to make the opt commandline driving of the new pass manager minimally functional for testing and further development. There is still a lot to be done there (notably the factoring into .def files to kill the current boilerplate code) but it is relatively uninteresting. The only interesting bit left for minimal functionality is supporting the registration of analyses. I'm planning on doing that on top of the .def file switch mostly because the boilerplate for the analyses would be significantly worse. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199646 91177308-0d34-0410-b5e6-96231b3b80d8
* [PM] Make the verifier work independently of any pass manager.Chandler Carruth2014-01-19
| | | | | | | | | | | | | | | | | | | | | | | This makes the 'verifyFunction' and 'verifyModule' functions totally independent operations on the LLVM IR. It also cleans up their API a bit by lifting the abort behavior into their clients and just using an optional raw_ostream parameter to control printing. The implementation of the verifier is now just an InstVisitor with no multiple inheritance. It also is significantly more const-correct, and hides the const violations internally. The two layers that force us to break const correctness are building a DomTree and dispatching through the InstVisitor. A new VerifierPass is used to implement the legacy pass manager interface in terms of the other pieces. The error messages produced may be slightly different now, and we may have slightly different short circuiting behavior with different usage models of the verifier, but generally everything works equivalently and this unblocks wiring the verifier up to the new pass manager. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199569 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm-objdump/COFF: Print ordinal base number.Rui Ueyama2014-01-17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199518 91177308-0d34-0410-b5e6-96231b3b80d8
* [opt][PassInfo] Allow opt to run passes that need target machine.Quentin Colombet2014-01-16
| | | | | | | | | | | | | | | | | | | When registering a pass, a pass can now specify a second construct that takes as argument a pointer to TargetMachine. The PassInfo class has been updated to reflect that possibility. If such a constructor exists opt will use it instead of the default constructor when instantiating the pass. Since such IR passes are supposed to be rare, no specific support has been added to this commit to allow an easy registration of such a pass. In other words, for such pass, the initialization function has to be hand-written (see CodeGenPrepare for instance). Now, codegenprepare can be tested using opt: opt -codegenprepare -mtriple=mytriple input.ll git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199430 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix style issues.Rui Ueyama2014-01-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199423 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm-objdump/COFF: Print DLL name in the export table header.Rui Ueyama2014-01-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199422 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm-symbolizer: make mangled name heuristic apply to all symbolsEd Maste2014-01-16
| | | | | | | | PR: http://llvm.org/pr18431 Review: http://llvm-reviews.chandlerc.com/D2552 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199404 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r199361: Now, the sanitizer got the changeQuentin Colombet2014-01-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199362 91177308-0d34-0410-b5e6-96231b3b80d8
* [LTO] Modify lto.exports to force the sanitizer to rebuilt LTO.exportsQuentin Colombet2014-01-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199361 91177308-0d34-0410-b5e6-96231b3b80d8
* llmv-objdump/COFF: Print export table contents.Rui Ueyama2014-01-16
| | | | | | | | | | | | | | | | This patch adds the capability to dump export table contents. An example output is this: Export Table: Ordinal RVA Name 5 0x2008 exportfn1 6 0x2010 exportfn2 By adding this feature to llvm-objdump, we will be able to use it to check export table contents in LLD's tests. Currently we are doing binary comparison in the tests, which is fragile and not readable to humans. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199358 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm-objdump: Don't print "Import table:" header if there's no import table.Rui Ueyama2014-01-15
| | | | | | | | If a binary does not depend on any DLL, it does not contain import table at all. Printing the section title without contents looks wrong, so we shouldn't print it in that case. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199340 91177308-0d34-0410-b5e6-96231b3b80d8
* [LTO] Add a hook to map LLVM diagnostics into the clients of LTO.Quentin Colombet2014-01-15
| | | | | | | | | | | | | | | | | | | | Add a hook in the C API of LTO so that clients of the code generator can set their own handler for the LLVM diagnostics. The handler is defined like this: typedef void (*lto_diagnostic_handler_t)(lto_codegen_diagnostic_severity_t severity, const char *diag, void *ctxt) - severity says how bad this is. - diag is a string that contains the diagnostic message. - ctxt is the registered context for this handler. This hook is more general than the lto_get_error_message, since this function keeps only the latest message and can only be queried when something went wrong (no warning for instance). <rdar://problem/15517596> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199338 91177308-0d34-0410-b5e6-96231b3b80d8