summaryrefslogtreecommitdiffstats
path: root/llvm/tools
Commit message (Collapse)AuthorAgeFilesLines
...
* Re-apply: [obj2yaml] [yaml2obj] Support MachO section and section_64Chris Bieneman2016-05-182-0/+86
| | | | | | This re-applies r269845, r269846, and r269850 with an included fix for a crash reported by zturner. llvm-svn: 269953
* Don't pass a Reloc::Model to MC.Rafael Espindola2016-05-183-18/+5
| | | | | | | | | | | | MC only needs to know if the output is PIC or not. It never has to decide about creating GOTs and PLTs for example. The only thing that MC itself uses this information for is expanding "macros" in sparc and mips. The rest I am pretty sure could be moved to CodeGen. This is a cleanup and isolates the code from future changes to Reloc::Model. llvm-svn: 269909
* [Coverage] Ensure that coverage mapping data has an expected alignment in ↵Igor Kudrin2016-05-181-1/+5
| | | | | | | | | | | | | 'covmapping' files. Coverage mapping data is organized in a sequence of blocks, each of which is expected to be aligned by 8 bytes. This feature is used when reading those blocks, see VersionedCovMapFuncRecordReader::readFunctionRecords(). If a misaligned covearge mapping data has more than one block, it causes llvm-cov to fail. Differential Revision: http://reviews.llvm.org/D20285 llvm-svn: 269887
* Delete default in fully covered switch.Rafael Espindola2016-05-181-1/+0
| | | | llvm-svn: 269872
* [codeview] Some cleanup of Symbol Records.Zachary Turner2016-05-171-62/+63
| | | | | | | | | | | | | | * Reworks the CVSymbolTypes.def to work similarly to TypeRecords.def. * Moves some enums from SymbolRecords.h to CodeView.h to maintain consistency with how we do type records. * Generalize a few simple things like the record prefix * Define the leaf enum and the kind enum similar to how we do with tyep records. Differential Revision: http://reviews.llvm.org/D20342 Reviewed By: amccarth, rnk llvm-svn: 269867
* llvm-dwp: remove some unused error handlingDavid Blaikie2016-05-171-8/+5
| | | | llvm-svn: 269866
* Revert "[obj2yaml] [yaml2obj] Support MachO section and section_64Zachary Turner2016-05-172-86/+0
| | | | | | | | | structs" This reverts commits r269845, r269846, and r269850 as they introduce a crash in obj2yaml when trying to do a roundtrip. llvm-svn: 269865
* llvm-dwp: Move error handling code closer to useDavid Blaikie2016-05-171-6/+6
| | | | llvm-svn: 269864
* pdbdump: Print out more strcutures.Rui Ueyama2016-05-171-0/+3
| | | | | | | | | | I don't yet fully understand the meaning of these data strcutures, but at least it seems that their sizes and types are correct. With this change, we can read publics streams till end. Differential Revision: http://reviews.llvm.org/D20343 llvm-svn: 269861
* llvm-dwp: Add error handling for multiple type sections in a dwp file.David Blaikie2016-05-171-1/+3
| | | | llvm-svn: 269851
* [obj2yaml] [yaml2obj] Support MachO section and section_64 structsChris Bieneman2016-05-172-0/+86
| | | | | | This patch adds round trip support for MachO section structs. llvm-svn: 269845
* Reapply r269782 "[obj2yaml] [yaml2obj] Support for MachO load command ↵Chris Bieneman2016-05-172-15/+45
| | | | | | | | structures"" This adds support for all the MachO *_command structures. The load_command payloads still are not represented, but that will come next. llvm-svn: 269808
* llvm-dwp: Simplify duplicate DWO ID error handlingDavid Blaikie2016-05-171-9/+9
| | | | llvm-svn: 269805
* [ThinLTO] Use semicolon to separate path prefix replacementReid Kleckner2016-05-172-7/+7
| | | | | | | | | | | | | | | | Summary: Colons can appear in Windows paths after drive letters. Both colon and semicolon are valid characters in filenames, but neither are very common. Semicolon seems just as good, and makes the test pass on Windows. Reviewers: tejohnson Subscribers: joker.eph, llvm-commits Differential Revision: http://reviews.llvm.org/D20332 llvm-svn: 269798
* Revert "[obj2yaml] [yaml2obj] Support for MachO load command structures"Chris Bieneman2016-05-172-46/+15
| | | | | | This reverts commit r269782 because it broke bots with -fpermissive. llvm-svn: 269785
* Change llvm-objdump, llvm-nm and llvm-size when reporting an object file errorKevin Enderby2016-05-178-52/+194
| | | | | | | | | | | | | | | | | | | | | when the object is in an archive to use something like libx.a(foo.o) as part of the error message. Also changed llvm-objdump and llvm-size to be like llvm-nm and ignore non-object files in archives and not produce any error message. To do this Archive::Child::getAsBinary() was changed from ErrorOr<...> to Expected<...> then that was threaded up to its users. Converting this interface to Expected<> from ErrorOr<> does involve touching a number of places. To contain the changes for now the use of errorToErrorCode() is still used in one place yet to be fully converted. Again there some were bugs in the existing code that did not deal with the old ErrorOr<> return values.  So now with Expected<> since they must be checked and the error handled, I added a TODO and a comments for those. llvm-svn: 269784
* [obj2yaml] [yaml2obj] Support for MachO load command structuresChris Bieneman2016-05-172-15/+46
| | | | | | This adds support for all the MachO *_command structures. The load_command payloads still are not represented, but that will come next. llvm-svn: 269782
* [ThinLTO] Option to control path of distributed backend filesTeresa Johnson2016-05-172-5/+103
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: Add support to control where files for a distributed backend (the individual index files and optional imports files) are created. This is invoked with a new thinlto-prefix-replace option in the gold plugin and llvm-lto. If specified, expects a string of the form "oldprefix:newprefix", and instead of generating these files in the same directory path as the corresponding bitcode file, will use a path formed by replacing the bitcode file's path prefix matching oldprefix with newprefix. Also add a new replace_path_prefix helper to Path.h in libSupport. Depends on D19636. Reviewers: joker.eph Subscribers: llvm-commits, joker.eph Differential Revision: http://reviews.llvm.org/D19644 llvm-svn: 269771
* llvm-dwp: Provide error handling for invalid string field formsDavid Blaikie2016-05-171-8/+16
| | | | | | | | | | This diagnostic could be improved by adding the name of the input file containing the invalid data and/or some information about how to identify the specific offending attribute/tag in the input. But that's not an immediate priority as these corner cases of invalid input shouldn't come up too often. llvm-svn: 269727
* llvm-dwp: Add error handling for invalid (non-CU) top level tag in ↵David Blaikie2016-05-161-8/+14
| | | | | | | | | | debug_info.dwo The diagnostic could be improved a bit to include information about which input file had the mistake (& which unit (counted, since the name of the unit won't be accessible) within the input). llvm-svn: 269723
* Remove extra semicolon to fix warning. NFC.Michael Kuperstein2016-05-161-1/+1
| | | | llvm-svn: 269722
* Revert "Retry^2 "[ProfileData] (llvm) Use Error in InstrProf and Coverage, NFC""Vedant Kumar2016-05-162-43/+30
| | | | | | | | This reverts commit r269694. MSVC says: error C2086: 'char llvm::ProfErrorInfoBase<enum llvm::instrprof_error>::ID' : redefinition llvm-svn: 269700
* Retry^2 "[ProfileData] (llvm) Use Error in InstrProf and Coverage, NFC"Vedant Kumar2016-05-162-30/+43
| | | | | | | | | | | | | | | Transition InstrProf and Coverage over to the stricter Error/Expected interface. Changes since the initial commit: - Address undefined-var-template warning. - Fix error message printing in llvm-profdata. - Check errors in loadTestingFormat() + annotateAllFunctions(). - Defer error handling in InstrProfIterator to InstrProfReader. Differential Revision: http://reviews.llvm.org/D19901 llvm-svn: 269694
* llvm-dwp: Streamline duplicate DWO ID diagnostic handlingDavid Blaikie2016-05-161-24/+27
| | | | | | | | Actually use the error return path rather than printing the duplicate information then a separate error. But also just tidy up/deduplicate some of the code for generating the diagnostic text. llvm-svn: 269692
* [llc] New diagnostic handlerRenato Golin2016-05-161-0/+29
| | | | | | | | | | | | | | | | | | | | | | Without a diagnostic handler installed, llc's behaviour is to exit on the first error that it encounters. This is very different from the behaviour of clang and other front ends, which try to gather as many errors as possible before exiting. This commit adds a diagnostic handler to llc, allowing it to find and report more than one error. The old behaviour is preserved under a flag (-exit-on-error). Some of the tests fail with the new diagnostic handler, so they have to use the new flag in order to run under the previous behaviour. Some of these are known bugs, others need further investigation. Ideally, we should fix the tests and remove the flag at some point in the future. Reapplied after fixing the LLDB build that was broken due to the new DiagnosticSeverity in LLVMContext.h, and fixed an UB in the new change. Patch by Diana Picus. llvm-svn: 269655
* macho2yaml.cpp: Fix "reserved" uninitialized.NAKAMURA Takumi2016-05-161-0/+1
| | | | | FIXME: It should reflect actual field. llvm-svn: 269645
* [PM] Refactor cross-registration of AM into an helper.Davide Italiano2016-05-141-10/+1
| | | | | | Requested by: Chandler Carruth. llvm-svn: 269582
* Revert "[llc] New diagnostic handler"Renato Golin2016-05-141-30/+0
| | | | | | | | | | | | This reverts commit r269563. Even though now it passes all LLDB bots after a local fix, there's a new buildbot it fails with tests that we hadn't seen locally: http://lab.llvm.org:8011/builders/clang-x86_64-linux-selfhost-modules/builds/15647 Adding those tests to the list to investigate. llvm-svn: 269568
* [llc] New diagnostic handlerRenato Golin2016-05-141-0/+30
| | | | | | | | | | | | | | | | | | | | | | Without a diagnostic handler installed, llc's behaviour is to exit on the first error that it encounters. This is very different from the behaviour of clang and other front ends, which try to gather as many errors as possible before exiting. This commit adds a diagnostic handler to llc, allowing it to find and report more than one error. The old behaviour is preserved under a flag (-exit-on-error). Some of the tests fail with the new diagnostic handler, so they have to use the new flag in order to run under the previous behaviour. Some of these are known bugs, others need further investigation. Ideally, we should fix the tests and remove the flag at some point in the future. Reapplied after fixing the LLDB build that was broken due to the new DiagnosticSeverity in LLVMContext.h. Patch by Diana Picus. llvm-svn: 269563
* Revert "Retry "[ProfileData] (llvm) Use Error in InstrProf and Coverage, NFC""Chandler Carruth2016-05-142-43/+30
| | | | | | | This reverts commit r269491. It triggers warnings with Clang, breaking builds for -Werror users including several build bots. llvm-svn: 269547
* Add testing in llvm-lto for ThinLTO caching.Mehdi Amini2016-05-141-0/+4
| | | | | | | Trying to improve code coverage for `make check` From: mehdi_amini <mehdi_amini@91177308-0d34-0410-b5e6-96231b3b80d8> llvm-svn: 269545
* Revert "Add testing in llvm-lto for ThinLTO caching."Mehdi Amini2016-05-141-4/+0
| | | | | | | | This reverts commit r269538 and r269542. "rename()" is expected to fail across filesystems, will handle this. From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 269543
* Add testing in llvm-lto for ThinLTO caching.Mehdi Amini2016-05-141-0/+4
| | | | | | | Trying to improve code coverage for `make check` From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 269538
* [codeview] Add type stream merging prototypeReid Kleckner2016-05-144-0/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This code is intended to be used as part of LLD's PDB writing. Until that exists, this is exposed via llvm-readobj for testing purposes. Type stream merging uses the following algorithm: - Begin with a new empty stream, and a new empty hash table that maps from type record contents to new type index. - For each new type stream, maintain a map from source type index to destination type index. - For each record, copy it and rewrite its type indices to be valid in the destination type stream. - If the new type record is not already present in the destination stream hash table, append it to the destination type stream, assign it the next type index, and update the two hash tables. - If the type record already exists in the destination stream, discard it and update the type index map to forward the source type index to the existing destination type index. Reviewers: zturner, ruiu Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D20122 llvm-svn: 269521
* Retry "[ProfileData] (llvm) Use Error in InstrProf and Coverage, NFC"Vedant Kumar2016-05-132-30/+43
| | | | | | | | | | | | | | Transition InstrProf and Coverage over to the stricter Error/Expected interface. Changes since the initial commit: - Fix error message printing in llvm-profdata. - Check errors in loadTestingFormat() + annotateAllFunctions(). - Defer error handling in InstrProfIterator to InstrProfReader. Differential Revision: http://reviews.llvm.org/D19901 llvm-svn: 269491
* pdbdump: Print "Publics" stream.Rui Ueyama2016-05-132-2/+25
| | | | | | | | | | | | | | | | Publics stream seems to contain information as to public symbols. It actually contains a serialized hash table along with fixed-sized headers. This patch is not complete. It scans only till the end of the stream and dump the header information. I'll write code to de-serialize the hash table later. Reviewers: zturner Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D20256 llvm-svn: 269484
* Revert "(HEAD -> master, origin/master, origin/HEAD) [ProfileData] (llvm) ↵Vedant Kumar2016-05-132-42/+30
| | | | | | | | Use Error in InstrProf and Coverage, NFC" This reverts commit r269462. It fails two llvm-profdata tests. llvm-svn: 269466
* [ProfileData] (llvm) Use Error in InstrProf and Coverage, NFCVedant Kumar2016-05-132-30/+42
| | | | | | | | | Transition InstrProf and Coverage over to the stricter Error/Expected interface. Differential Revision: http://reviews.llvm.org/D19901 llvm-svn: 269462
* [obj2yaml] [yaml2obj] Basic support for MachO::load_commandChris Bieneman2016-05-132-6/+33
| | | | | | | | This patch adds basic support for MachO::load_command. Load command types and sizes are encoded in the YAML and expanded back into MachO. The YAML doesn't yet support load command structs, that is coming next. In the meantime as a temporary measure when writing MachO files the load commands are padded with zeros so that the generated binary is valid. llvm-svn: 269442
* Revert "[llc] New diagnostic handler"Renato Golin2016-05-131-30/+0
| | | | | | | | This reverts commit r269428, as it breaks the LLDB build. We need to understand how to change LLDB in the same way as LLC before landing this again. llvm-svn: 269432
* [llc] New diagnostic handlerRenato Golin2016-05-131-0/+30
| | | | | | | | | | | | | | | | | | | Without a diagnostic handler installed, llc's behaviour is to exit on the first error that it encounters. This is very different from the behaviour of clang and other front ends, which try to gather as many errors as possible before exiting. This commit adds a diagnostic handler to llc, allowing it to find and report more than one error. The old behaviour is preserved under a flag (-exit-on-error). Some of the tests fail with the new diagnostic handler, so they have to use the new flag in order to run under the previous behaviour. Some of these are known bugs, others need further investigation. Ideally, we should fix the tests and remove the flag at some point in the future. Patch by Diana Picus. llvm-svn: 269428
* [llvm-mc-fuzzer] Use LLVMFuzzerInitialize() instead of a custom main() and ↵Daniel Sanders2016-05-132-11/+34
| | | | | | | | | | | | FuzzerDriver() Reviewers: kcc Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D20201 llvm-svn: 269405
* [ThinLTO] Use correct pipeline for ThinLTO in gold-plugin.Teresa Johnson2016-05-131-1/+4
| | | | | | | | This change is the gold side of the change made in D17115 and clang patch r261045 to add a ThinLTO specific pipeline that moves more of the optimization to the backends. llvm-svn: 269386
* dsymutil: Fix the DWOId mismatch check for cached modules.Adrian Prantl2016-05-131-5/+13
| | | | | | | | | | | | | | In verbose mode, we emit a warning if the DWOId of a skeleton CU mismatches the DWOId of the referenced module. This patch updates the cached DWOId after a module has been loaded to the DWOId of the module on disk (instead of storing the DWOId we expected to load). This allows us to correctly emit the mismatch warning for all subsequent object files that want to import the same module. This patch also ensures both warnings are only emitted in verbose mode. rdar://problem/26214027 llvm-svn: 269383
* [codeview] Try to handle errors better in record iteratorReid Kleckner2016-05-121-1/+6
| | | | llvm-svn: 269381
* llvm-readobj: Fix GNU style entry point print widthHemant Kulkarni2016-05-121-1/+1
| | | | llvm-svn: 269376
* llvm-readobj: Change Hex output for GNU style dynamic table printHemant Kulkarni2016-05-121-3/+4
| | | | | | | Dynamic table when printed shows uppercase tag/values. This changes it to lower case when printing in GNU style llvm-svn: 269368
* llvm-dwp: Use llvm::Error to improve diagnostic quality/error handling in ↵David Blaikie2016-05-124-20/+45
| | | | | | llvm-dwp llvm-svn: 269339
* llvm-readobj: Fix the GNU section header flags for SHF_MASKPROC and SHF_MASKOSHemant Kulkarni2016-05-121-2/+4
| | | | llvm-svn: 269338
* [obj2yaml] Fix ASAN bot failureChris Bieneman2016-05-121-4/+4
| | | | | | | | I was leaking out of a unique_ptr, should have just kept it in the unique_ptr. http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-fast/builds/12738/steps/check-llvm%20asan/logs/stdio llvm-svn: 269336
OpenPOWER on IntegriCloud