aboutsummaryrefslogtreecommitdiffstats
path: root/test/tools
Commit message (Collapse)AuthorAgeFilesLines
* Update aosp/master LLVM for rebase to r235153Pirama Arumuga Nainar2015-05-1812-0/+1203
| | | | | Change-Id: I9bf53792f9fc30570e81a8d80d296c681d005ea7 (cherry picked from commit 0c7f116bb6950ef819323d855415b2f2b0aad987)
* Update aosp/master llvm for rebase to r233350Pirama Arumuga Nainar2015-04-0972-131/+1742
| | | | Change-Id: I07d935f8793ee8ec6b7da003f6483046594bca49
* Update aosp/master LLVM for rebase to r230699.Stephen Hines2015-03-23113-344/+2711
| | | | Change-Id: I2b5be30509658cb8266be782de0ab24f9099f9b9
* Update aosp/master LLVM for rebase to r222494.Stephen Hines2014-12-02182-158/+2372
| | | | Change-Id: Ic787f5e0124df789bd26f3f24680f45e678eef2d
* Update LLVM for rebase to r212749.Stephen Hines2014-07-2111-63/+418
| | | | | | | Includes a cherry-pick of: r212948 - fixes a small issue with atomic calls Change-Id: Ib97bd980b59f18142a69506400911a6009d9df18
* Update LLVM for 3.5 rebase (r209712).Stephen Hines2014-05-2925-16/+409
| | | | Change-Id: I149556c940fb7dc92d075273c87ff584f400941f
* Update to LLVM 3.5a.Stephen Hines2014-04-2495-164/+2951
| | | | Change-Id: Ifadecab779f128e62e430c2b4f6ddd84953ed617
* Path: Recognize COFF import library file magic.Rui Ueyama2013-11-152-0/+17
| | | | | | | | | | | | Summary: Make identify_magic to recognize COFF import file. Reviewers: Bigcheese CC: llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D2165 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194852 91177308-0d34-0410-b5e6-96231b3b80d8
* Recognize 0x0000 as a COFF file magic.Rui Ueyama2013-11-142-0/+16
| | | | | | | | | | | | | | | Summary: Some machine-type-neutral object files containing only undefined symbols actually do exist in the Windows standard library. Need to recognize them as COFF files. Reviewers: Bigcheese CC: llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D2164 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194734 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm-cov.test: Remove XFAIL:arm. Seems this is passing since my tweaks.NAKAMURA Takumi2013-11-141-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194712 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm-cov.test: Tweak win32 hosts not confused by \r\n in llvm-cov's stdout.NAKAMURA Takumi2013-11-141-1/+1
| | | | | | "diff -b" -- Ignore space changes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194694 91177308-0d34-0410-b5e6-96231b3b80d8
* Suppress llvm-cov.test on Win32, with REQUIRES: shellNAKAMURA Takumi2013-11-141-0/+2
| | | | | | "cd" is unsupported in lit internal runner. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194652 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm-cov: Removed StringMap holding GCOVLines.Yuchen Wu2013-11-141-0/+0
| | | | | | | | | | | | | | | | | According to the hazy gcov documentation, it appeared to be technically possible for lines within a block to belong to different source files. However, upon further investigation, gcov does not actually support multiple source files for a single block. This change removes a level of separation between blocks and lines by replacing the StringMap of GCOVLines with a SmallVector of ints representing line numbers. This also means that the GCOVLines class is no longer needed. This paves the way for supporting the "-a" option, which will output block information. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194637 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm-cov: Replaced asserts with proper error handling.Yuchen Wu2013-11-141-1/+5
| | | | | | | | | | | | | | Unified the interface for read functions. They all return a boolean indicating if the read from file succeeded. Functions that previously returned the read value now store it into a variable that is passed in by reference instead. Callers will need to check the return value to detect if an error occurred. Also added a new test which ensures that no assertions occur when file contains invalid data. llvm-cov should return with error code 1 upon failure. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194635 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm-cov: Changed XFAIL targets to be more generic.Yuchen Wu2013-11-131-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194622 91177308-0d34-0410-b5e6-96231b3b80d8
* Added basic unit test for llvm-cov.Yuchen Wu2013-11-137-0/+171
| | | | | | | | | | This test compares the output of llvm-cov against a coverage file generated by gcov. Currently, llvm-cov does not work on certain platforms (namely big-endian architectures such as PowerPC, among others). These platforms are marked as XFAIL for now, but will be fixed later. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194616 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "Added basic unit test for llvm-cov."Yuchen Wu2013-11-127-169/+0
| | | | | | | | | | | This reverts commit r194451. Not sure why the tests are failing on the buildbot. They run fine on my local machine. Could it possibly be because of the endianness of the architectures? The GCNO and GCDA files are little-endian encoded, and llvm-cov expects it to remain that way. Is this a safe assumption? git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194454 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm-cov: Added call to update run/program counts.Yuchen Wu2013-11-122-0/+0
| | | | | | Also updated test files that were generated from this change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194453 91177308-0d34-0410-b5e6-96231b3b80d8
* Added basic unit test for llvm-cov.Yuchen Wu2013-11-127-0/+169
| | | | | | | | | This test compares the output of llvm-cov against a coverage file generated by gcov. Since the source file must be in the current directory when reading GCNO files, the test will first cd into the Inputs directory. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194451 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for DT_VERxxx and DT_MIPS_xxx .dynamic section entries to theSimon Atanasyan2013-11-113-0/+40
| | | | | | | | | llvm-readobj. The patch reviewed by Michael Spencer. http://llvm-reviews.chandlerc.com/D2113 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194421 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "Added basic unit test for llvm-cov."Yuchen Wu2013-11-057-169/+0
| | | | | | This reverts commit 9cacd131c22b888303cb88e9a3235b2d7b2f19a1. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194039 91177308-0d34-0410-b5e6-96231b3b80d8
* Added basic unit test for llvm-cov.Yuchen Wu2013-11-057-0/+169
| | | | | | | This test compares the output of llvm-cov against a coverage file generated by gcov. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194038 91177308-0d34-0410-b5e6-96231b3b80d8
* [Mips] Teach llvm-readobj to print MIPS-specific ELF program headers.Simon Atanasyan2013-10-071-0/+30
| | | | | | | The patch reviewed by Michael Spencer. http://llvm-reviews.chandlerc.com/D1846 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192093 91177308-0d34-0410-b5e6-96231b3b80d8
* Resurrect lit.local.cfg to un-break hexagon buildbot.Rui Ueyama2013-09-271-0/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191565 91177308-0d34-0410-b5e6-96231b3b80d8
* Re-submit r191472 with a fix for big endian.Rui Ueyama2013-09-2710-125/+128
| | | | | | llvm-objdump: Dump COFF import table if -private-headers option is given. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191557 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "llvm-objdump: Dump COFF import table if -private-headers option is ↵Rui Ueyama2013-09-2710-128/+125
| | | | | | | | given." This reverts commit r191472 because it's failing on BE machine. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191480 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm-objdump: Dump COFF import table if -private-headers option is given.Rui Ueyama2013-09-2710-125/+128
| | | | | | | | | | | | | | | | This is a patch to add capability to llvm-objdump to dump COFF Import Table entries, so that we can write tests for LLD checking Import Table contents. llvm-objdump did not print anything but just file name if the format is COFF and -private-headers option is given. This is a patch adds capability for dumping DLL Import Table, which is specific to the COFF format. In this patch I defined a new iterator to iterate over import table entries. Also added a few functions to COFFObjectFile.cpp to access fields of the entry. Differential Revision: http://llvm-reviews.chandlerc.com/D1719 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191472 91177308-0d34-0410-b5e6-96231b3b80d8
* Move LTO support library to a component, allowing it to be testedPeter Collingbourne2013-09-242-26/+0
| | | | | | more reliably across platforms. Patch by Tom Roeder! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191343 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm/test/tools/lto/lit.local.cfg: Add "MingW" for exclusion list.NAKAMURA Takumi2013-09-231-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191185 91177308-0d34-0410-b5e6-96231b3b80d8
* test/tools/lto/lit.local.cfg: Suppress llvm-lto test on Cygwin and Win32, ↵NAKAMURA Takumi2013-09-201-0/+3
| | | | | | for now. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191086 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix LTO handling of module-level assembly (PR14152).Peter Collingbourne2013-09-192-0/+23
| | | | | | Patch by Tom Roeder! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191042 91177308-0d34-0410-b5e6-96231b3b80d8
* Generate IMAGE_REL_AMD64_ADDR32NB relocations for SEHKai Nacke2013-09-151-10/+10
| | | | | | | | | | | | | | | data structures. The Win64 EH data structures must be of type IMAGE_REL_AMD64_ADDR32NB instead of IMAGE_REL_AMD64_ADDR32. This is easiely achieved by adding the VK_COFF_IMGREL32 modifier to the symbol reference. Change also references to start and end of the SEH range of a function as offsets to start of the function. Reviewed by Jim Grosbach, Charles Davis and Nico Rieck. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190766 91177308-0d34-0410-b5e6-96231b3b80d8
* Print string value for DT_RPATH and DT_RUNPATH.Joerg Sonnenberger2013-09-032-0/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189829 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix wrong code offset for unwind code SET_FPREG.Kai Nacke2013-08-271-1/+1
| | | | | | | | | | | | | The code offset for unwind code SET_FPREG is wrong because it is set to constant 0. The fix is to do the same as for the other unwind codes: emit a label and later the absolute difference between the label and the begin of the prologue. Also enables the failing test case MC/COFF/seh.s Reviewed by Jim Grosbach, Charles Davis and Nico Rieck. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189309 91177308-0d34-0410-b5e6-96231b3b80d8
* [tests] Cleanup initialization of test suffixes.Daniel Dunbar2013-08-163-4/+0
| | | | | | | | | | | | | | | | | - Instead of setting the suffixes in a bunch of places, just set one master list in the top-level config. We now only modify the suffix list in a few suites that have one particular unique suffix (.ml, .mc, .yaml, .td, .py). - Aside from removing the need for a bunch of lit.local.cfg files, this enables 4 tests that were inadvertently being skipped (one in Transforms/BranchFolding, a .s file each in DebugInfo/AArch64 and CodeGen/PowerPC, and one in CodeGen/SI which is now failing and has been XFAILED). - This commit also fixes a bunch of config files to use config.root instead of older copy-pasted code. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188513 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove the mblaze backend from llvm.Rafael Espindola2013-07-252-48/+0
| | | | | | Approval in here http://lists.cs.uiuc.edu/pipermail/llvmdev/2013-July/064169.html git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187145 91177308-0d34-0410-b5e6-96231b3b80d8
* Retry submitting r186623: COFFDumper: Dump data directory entries.Rui Ueyama2013-07-192-11/+45
| | | | | | | | The original change was rolled back in r186627 because of test failures on the big endian machine. I believe I fixed the issue so re-submitting. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186734 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "COFFDumper: Dump data directory entries."Rui Ueyama2013-07-182-45/+11
| | | | | | Because it broke s390x and ppc64-linux buildbots. This reverts commit r186623. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186627 91177308-0d34-0410-b5e6-96231b3b80d8
* COFFDumper: Dump data directory entries.Rui Ueyama2013-07-182-11/+45
| | | | | | | | | | | | | | | | | Summary: Dump optional data directory entries in the PE/COFF header, so that we can test the output of LLD linker. This patch updates the test binary file, but the source of the binary is the same. I just re-linked the file. I don't know how the previous file was linked, but the previous file did not have any data directory entries for some reason. Reviewers: rafael CC: llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D1148 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186623 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert: Fix wrong code offset for unwind code SET_FPREG.Kai Nacke2013-07-081-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185793 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert: Generate IMAGE_REL_AMD64_ADDR32NB relocations for SEH data structures.Kai Nacke2013-07-081-10/+10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185791 91177308-0d34-0410-b5e6-96231b3b80d8
* Generate IMAGE_REL_AMD64_ADDR32NB relocations for SEHKai Nacke2013-07-061-10/+10
| | | | | | | | | | | | | | | data structures. The Win64 EH data structures must be of type IMAGE_REL_AMD64_ADDR32NB instead of IMAGE_REL_AMD64_ADDR32. This is easiely achieved by adding the VK_COFF_IMGREL32 modifier to the symbol reference. Change also references to start and end of the SEH range of a function as offsets to start of the function. Reviewed by Charles Davis and Nico Rieck. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185759 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix wrong code offset for unwind code SET_FPREG.Kai Nacke2013-07-061-1/+1
| | | | | | | | | | | | | The code offset for unwind code SET_FPREG is wrong because it is set to constant 0. The fix is to do the same as for the other unwind codes: emit a label and later the absolute difference between the label and the begin of the prologue. Also enables the failing test case MC/COFF/seh.s Reviewed by Charles Davis and Nico Rieck. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185758 91177308-0d34-0410-b5e6-96231b3b80d8
* readobj: Dump PE/COFF optional records.Rui Ueyama2013-06-122-0/+51
| | | | | | | | | | | | 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
* Don't hide the first ELF symbol.Rafael Espindola2013-06-051-0/+9
| | | | | | | | The first symbol on ELF is dummy, but it has a defined content and readelf normally displays it. With this change llvm-readobj also displays it and we can check that llvm-mc output is correct according to the standard. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183337 91177308-0d34-0410-b5e6-96231b3b80d8
* Change how we iterate over relocations on ELF.Rafael Espindola2013-05-302-5/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | For COFF and MachO, sections semantically have relocations that apply to them. That is not the case on ELF. In relocatable objects (.o), a section with relocations in ELF has offsets to another section where the relocations should be applied. In dynamic objects and executables, relocations don't have an offset, they have a virtual address. The section sh_info may or may not point to another section, but that is not actually used for resolving the relocations. This patch exposes that in the ObjectFile API. It has the following advantages: * Most (all?) clients can handle this more efficiently. They will normally walk all relocations, so doing an effort to iterate in a particular order doesn't save time. * llvm-readobj now prints relocations in the same way the native readelf does. * probably most important, relocations that don't point to any section are now visible. This is the case of relocations in the rela.dyn section. See the updated relocation-executable.test for example. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182908 91177308-0d34-0410-b5e6-96231b3b80d8
* Use pointers to iterate over symbols.Rafael Espindola2013-04-242-52/+52
| | | | | | | | While here, don't report a dummy symbol for relocations that don't have symbols. We used to says such relocations were for the first defined symbol, but now we return end_symbols(). The llvm-readobj output change agrees with otool. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180214 91177308-0d34-0410-b5e6-96231b3b80d8
* At Jim Grosbach's request detemplate Object/MachO.h.Rafael Espindola2013-04-184-0/+487
| | | | | | | We are still able to handle mixed endian objects by swapping one struct at a time. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179778 91177308-0d34-0410-b5e6-96231b3b80d8
* Finish templating MachObjectFile over endianness.Rafael Espindola2013-04-135-0/+533
| | | | | | | We are now able to handle big endian macho files in llvm-readobject. Thanks to David Fang for providing the object files. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179440 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach llvm-readobj to print ELF program headersNico Rieck2013-04-121-0/+74
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179363 91177308-0d34-0410-b5e6-96231b3b80d8