summaryrefslogtreecommitdiffstats
path: root/llvm/tools
Commit message (Collapse)AuthorAgeFilesLines
...
* dsymutil: print a warning when there is a module hash mismatch.Adrian Prantl2015-09-231-13/+34
| | | | | | | This also updates the module binaries in the test directory because their module hash mismatched. llvm-svn: 248396
* [dsymutil] Plug a memory leak.Benjamin Kramer2015-09-231-2/+2
| | | | llvm-svn: 248372
* dsymutil: Fix a comment. [-Wdocumentation]NAKAMURA Takumi2015-09-231-1/+1
| | | | llvm-svn: 248353
* dsymutil: Follow references to clang modules and recursively clone theAdrian Prantl2015-09-221-7/+135
| | | | | | | | debug info. This does not yet resolve external type references. llvm-svn: 248331
* dsymutil: Make -oso-prepend-path available to DwarfLinker.Adrian Prantl2015-09-222-0/+2
| | | | | | NFC llvm-svn: 248312
* dsymutil: Make resolveDIEReference and getUnitForOffset static functions.Adrian Prantl2015-09-221-16/+12
| | | | | | NFC. llvm-svn: 248311
* dsymutil: Make DwarfLinker::reportWarning() public. (NFC)Adrian Prantl2015-09-221-3/+3
| | | | llvm-svn: 248310
* Remove macho-dump. Its functionality is now covered by llvm-readobj.Davide Italiano2015-09-226-483/+1
| | | | | | | Approved by: Rafael Espindola, Eric Christopher, Jim Grosbach, Alex Rosenberg llvm-svn: 248302
* Fix a typo.Adrian Prantl2015-09-221-4/+4
| | | | llvm-svn: 248283
* [llvm-mc-fuzzer] Support untested instruction discovery for variable length ↵Daniel Sanders2015-09-221-0/+11
| | | | | | | | | | | | | | | | | | | | | instruction sets like microMIPS. Summary: For fixed length instructions, we can use -max_len to limit the fuzzer to a single instruction. This doesn't work for variable length instruction sets since a 4-byte input could consist of one 4-byte instruction or two 2-byte instructions. This patch adds a --insn-limit to llvm-mc-fuzzer to limit the input in terms of instructions processed. Reviewers: kcc Subscribers: kcc, llvm-commits Differential Revision: http://reviews.llvm.org/D12960 llvm-svn: 248253
* [llvm-readobj/MachO] Ensure we always have valid CmdName/SegmentName.Davide Italiano2015-09-221-2/+2
| | | | | | | | Otherwise we might end up printing garbage while dumping. Differential Revision: http://reviews.llvm.org/D13041 llvm-svn: 248239
* Avoid SEGFAULT if a requested symbol section is absent.Rafael Espindola2015-09-211-0/+2
| | | | | | Patch by Igor Kudrin! llvm-svn: 248194
* Use makeArrayRef or None to avoid unnecessarily mentioning the ArrayRef type ↵Craig Topper2015-09-214-14/+14
| | | | | | extra times. NFC llvm-svn: 248140
* [obj2yaml] Fix "time of check to time of use" bug. Add a test.Davide Italiano2015-09-191-3/+0
| | | | llvm-svn: 248096
* [llvm-readobj] Fix another "time of check to time of use bug".Davide Italiano2015-09-171-5/+0
| | | | | | It seems there's more copy-paste between tools than needed. llvm-svn: 247954
* Restore "Function bitcode index in Value Symbol Table and lazy reading support"Teresa Johnson2015-09-171-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit r247898 (which reverted r247894). Patch fixed to address two issues exposed by buildbots: - unused variable warning in NDEBUG mode - std::initializer_list lifetime issue causing test failures Original Summary: Support for including the function bitcode indices in the Value Symbol Table. This requires writing the VST after the function blocks, which in turn requires a new VST forward declaration record encoding the offset of the full VST (which is backpatched to contain the offset after the VST is written). This patch also enables the lazy function reader to use the new function indices out of the VST. This support will be used by ThinLTO as well, which will be in a follow on patch. Backwards compatibility with older bitcode files is maintained. A new test is also included. The bitcode format (used for the lazy reader as well as the upcoming ThinLTO patches) came out of discussions with Duncan and others and is described here: https://drive.google.com/file/d/0B036uwnWM6RWdnBLakxmeDdOeXc/view Reviewers: dexonsmith, davidxl, joker.eph Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D12536 llvm-svn: 247927
* Revert "Function bitcode index in Value Symbol Table and lazy reading support"Teresa Johnson2015-09-171-2/+0
| | | | | | | | | | Temporarily revert to fix some buildbot issues. One is a minor issue with a variable unused in NDEBUG mode. More concerning are some test failures on win7 that I need to dig into. This reverts commit 4e66a74543459832cfd571db42b4543580ae1d1d. llvm-svn: 247898
* Function bitcode index in Value Symbol Table and lazy reading supportTeresa Johnson2015-09-171-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Support for including the function bitcode indices in the Value Symbol Table. This requires writing the VST after the function blocks, which in turn requires a new VST forward declaration record encoding the offset of the full VST (which is backpatched to contain the offset after the VST is written). This patch also enables the lazy function reader to use the new function indices out of the VST. This support will be used by ThinLTO as well, which will be in a follow on patch. Backwards compatibility with older bitcode files is maintained. A new test is also included. The bitcode format (used for the lazy reader as well as the upcoming ThinLTO patches) came out of discussions with Duncan and others and is described here: https://drive.google.com/file/d/0B036uwnWM6RWdnBLakxmeDdOeXc/view Reviewers: dexonsmith, davidxl, joker.eph Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D12536 llvm-svn: 247894
* Check for errors after reading a sample profile in llvm-profdata.Diego Novillo2015-09-171-1/+3
| | | | | | | After reading the profile, check if the reader returned any errors before showing the profile. llvm-svn: 247873
* Disable the second verification run when performing LTO throughTeresa Johnson2015-09-161-1/+10
| | | | | | | | gold in NDEBUG mode. Follow on patch for r247729 - LTO: Disable extra verify runs in release builds. llvm-svn: 247824
* llvm-mc-fuzzer: A fuzzing tool for the MC layer.Daniel Sanders2015-09-162-0/+147
| | | | | | | | | | | | | | | Summary: Only the disassembler is supported in this patch but it has already found a few issues in the Mips disassembler (mostly invalid instructions being successfully disassembled). Reviewers: kcc Subscribers: russell.gallop, silvas, kcc, llvm-commits Differential Revision: http://reviews.llvm.org/D12723 llvm-svn: 247786
* [llvm-cxxdump] Remove duplicate code check.Davide Italiano2015-09-151-6/+0
| | | | | | | We already fail with 'No such file or directory' when we try to open the file -- if that doesn't exist. Also add a test to verify this behavior. llvm-svn: 247744
* Reapply "LTO: Disable extra verify runs in release builds"Duncan P. N. Exon Smith2015-09-152-8/+22
| | | | | | | This reverts commit r247730, effectively reapplying r247729. This time I have an lld commit ready to follow. llvm-svn: 247735
* Revert "LTO: Disable extra verify runs in release builds"Duncan P. N. Exon Smith2015-09-152-22/+8
| | | | | | | This temporarily reverts commit r247729, as it caused lld build failures. I'll recommit once I have an lld patch ready-to-go. llvm-svn: 247730
* LTO: Disable extra verify runs in release buildsDuncan P. N. Exon Smith2015-09-152-8/+22
| | | | | | | | | | | | | | | | | | | | | | The verifier currently runs three times in LTO: (1) after parsing, (2) at the beginning of the optimization pipeline, and (3) at the end of it. The first run is important, since we're not sure where the bitcode comes from and it's nice to validate it, but in release builds the extra runs aren't appropriate. This commit: - Allows these runs to be disabled in LTOCodeGenerator. - Adds command-line options to llvm-lto. - Adds command-line options to libLTO.dylib, and disables the verifier by default in release builds (based on NDEBUG). This shaves about 3.5% off the runtime of ld64 when linking verify-uselistorder with -flto -g. rdar://22509081 llvm-svn: 247729
* Revert r247692: Replace Triple with a new TargetTuple in MCTargetDesc/* and ↵Daniel Sanders2015-09-155-15/+13
| | | | | | | | related. NFC. Eric has replied and has demanded the patch be reverted. llvm-svn: 247702
* Re-commit r247683: Replace Triple with a new TargetTuple in MCTargetDesc/* ↵Daniel Sanders2015-09-155-13/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | and related. NFC. Summary: This is the first patch in the series to migrate Triple's (which are ambiguous) to TargetTuple's (which aren't). For the moment, TargetTuple simply passes all requests to the Triple object it holds. Once it has replaced Triple, it will start to implement the interface in a more suitable way. This change makes some changes to the public C++ API. In particular, InitMCSubtargetInfo(), createMCRelocationInfo(), and createMCSymbolizer() now take TargetTuples instead of Triples. The other public C++ API's have been left as-is for the moment to reduce patch size. This commit also contains a trivial patch to clang to account for the C++ API change. Thanks go to Pavel Labath for fixing LLDB for me. Reviewers: rengolin Subscribers: jyknight, dschuff, arsenm, rampitec, danalbert, srhines, javed.absar, dsanders, echristo, emaste, jholewinski, tberghammer, ted, jfb, llvm-commits, rengolin Differential Revision: http://reviews.llvm.org/D10969 llvm-svn: 247692
* Revert r247684 - Replace Triple with a new TargetTuple ...Daniel Sanders2015-09-155-15/+13
| | | | | | LLDB needs to be updated in the same commit. llvm-svn: 247686
* Replace Triple with a new TargetTuple in MCTargetDesc/* and related. NFC.Daniel Sanders2015-09-155-13/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This is the first patch in the series to migrate Triple's (which are ambiguous) to TargetTuple's (which aren't). For the moment, TargetTuple simply passes all requests to the Triple object it holds. Once it has replaced Triple, it will start to implement the interface in a more suitable way. This change makes some changes to the public C++ API. In particular, InitMCSubtargetInfo(), createMCRelocationInfo(), and createMCSymbolizer() now take TargetTuples instead of Triples. The other public C++ API's have been left as-is for the moment to reduce patch size. This commit also contains a trivial patch to clang to account for the C++ API change. Reviewers: rengolin Subscribers: jyknight, dschuff, arsenm, rampitec, danalbert, srhines, javed.absar, dsanders, echristo, emaste, jholewinski, tberghammer, ted, jfb, llvm-commits, rengolin Differential Revision: http://reviews.llvm.org/D10969 llvm-svn: 247683
* dsymutil: Remove the now obsolete RelocMgr argument from cloneDIE. (NFC)Adrian Prantl2015-09-141-8/+6
| | | | llvm-svn: 247636
* [llvm-cov] Disable name and path truncationVedant Kumar2015-09-142-6/+22
| | | | | | | | | | | Change the output of llvm-cov s.t it does not truncate function names and file paths when printing coverage reports. Differential Revision: http://reviews.llvm.org/D12647 rdar://22531141 llvm-svn: 247635
* [CMake] Refactor and cleanup generating and installing symlinks to tools.Chris Bieneman2015-09-142-58/+2
| | | | | | | | | | | | Summary: This change generalizes symlink generation and makes symlinks to tools obey LLVM_TOOLCHAIN_TOOLS. It makes it so that if you exclude llvm-ar from LLVM_TOOLCHAIN_TOOLS you don't end up with broken symlinks to llvm-lib and llvm-ranlib in your install. Reviewers: bogner, chapuni, rafael Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D12864 llvm-svn: 247632
* [CMake] Add llvm-ar subdirectory explicitly.Chris Bieneman2015-09-141-2/+3
| | | | | | This is required because ExternalProject_Add requires all targets specified in the DEPENDS argument must exist before calling ExternalProject_Add. llvm-svn: 247592
* [llvm-mc] Better error handling in ENOENT case + test.Davide Italiano2015-09-141-6/+1
| | | | | | | | | | | | | This is a follow up to r247518. As a general note, I think we could do a much better job testing for error conditions in tools. I already anticipated in a previous mail, but while implementing this I noticed that the code coverage we have for error checking is pretty low. I can arbitrarily remove checks from several tools and the suite still passes. Differential Revision: http://reviews.llvm.org/D12846 llvm-svn: 247582
* dsymutil: Factor out the DIE cloning into a DIECloner class. (NFC)Adrian Prantl2015-09-141-161/+169
| | | | llvm-svn: 247577
* [llvm-mc] More meaningful error if input file doesn't exist.Davide Italiano2015-09-131-0/+5
| | | | | | | | | Before we just printed on stderr the program name. Now at least we print the name of the file that doesn't exist. There's probably room for improvement of error handling in llvm-mc (and the tools in general), but still this is a step forward. llvm-svn: 247518
* dsymutil: Factor out the relocation handling into a RelocationManager (NFC)Adrian Prantl2015-09-111-125/+176
| | | | llvm-svn: 247490
* Add a non-exiting diagnostic handler for LTO.Yunzhong Gao2015-09-111-1/+4
| | | | | | | This is in order to give LTO clients a chance to do some clean-up before terminating the process. llvm-svn: 247461
* [dsymutil] Discard useless location attributes.Frederic Riss2015-09-111-4/+68
| | | | | | | | | | | | | | When cloning the debug info for a function that hasn't been linked, strip the DIEs from all location attributes that wouldn't contain any meaningful information anyway. This kind of situation can happen when a function got discarded by the linker, but its debug information is still wanted in the final link because it was marked as required as some other DIE dependency. The easiest way to get into that situation is to have using directives. They get linked unconditionally, but their targets might not always be present. llvm-svn: 247386
* [dsymutil] Rename some variables NFC.Frederic Riss2015-09-111-11/+11
| | | | | | | lldb doesn't like having variables named as an existing type. In order to ease debugging, rename those variables to avoid that conflict. llvm-svn: 247385
* [CMake] Add lto subdirectory explicitly.Chris Bieneman2015-09-101-0/+4
| | | | | | | | This is required because ExternalProject_Add requires all targets specified in the DEPENDS argument must exist before calling ExternalProject_Add. I have a follow-up patch to clang that enables using the just-built libLTO in bootstrap builds, so we need to be able to add the LTO target as a dependency in clang. llvm-svn: 247316
* llvm-config: Add --build-system optionTom Stellard2015-09-094-0/+8
| | | | | | | | | | | | | | | Summary: This can be used for distinguishing between cmake and autoconf builds. Users may need this in order to handle inconsistencies between the outputs of the two build systems. Reviewers: echristo, chandlerc, beanz Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D11838 llvm-svn: 247159
* [llvm-readobj] MachO -- dump LinkerOptions load command.Davide Italiano2015-09-093-0/+28
| | | | | | | | | | | | | | | | | | | | Example output: Linker Options { Size: 32 Count: 2 Strings [ Value: -framework Value: Cocoa ] } There were only two tests using this -- so I converted them as part of this commit rather than separately. Differential Revision: http://reviews.llvm.org/D12702 llvm-svn: 247106
* [llvm-readobj] Shrink code a little bit. No functional change.Davide Italiano2015-09-071-36/+9
| | | | llvm-svn: 246976
* [cmake] rework LLVM_LINK_LLVM_DYLIB option handlingAndrew Wilkins2015-09-051-47/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This diff attempts to address the concerns raised in http://reviews.llvm.org/D12488. We introduce a new USE_SHARED option to llvm_config, which, if set, causes the target to be linked against libLLVM. add_llvm_utility now uniformly disables linking against libLLVM. These utilities are not intended for distribution, and this keeps the option handling more centralised. llvm-shlib is now processes before any other "tools" subdirectories, ensuring the libLLVM target is defined before its dependents. One main difference from what was requested: llvm_config does not prune LLVM_DYLIB_COMPONENTS from the components passed into explicit_llvm_config. This is because the "all" component does something special, adding additional libraries (namely libLTO). Adding the component libraries after libLLVM should not be a problem, as symbols will be resolved in libLLVM first. Finally, I'm not really happy with the DISABLE_LLVM_LINK_LLVM option, but I'm not sure of a better way to get the following: - link all tools and shared libraries to libLLVM if LLVM_LINK_LLVM_DYLIB is set - some way of explicitly *not* doing so for utilities and libLLVM itself Suggestions for improvement here are particularly welcome. Reviewers: beanz Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D12590 llvm-svn: 246918
* [llvm-readobj] MachO: dump the correct field.Davide Italiano2015-09-041-1/+1
| | | | | | | This was found while converting a test from macho-dump to llvm-readobj and will once I commit the converted test. llvm-svn: 246868
* [llvm-readobj] Dump MachO indirect symbols.Davide Italiano2015-09-033-0/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Example output: File: <stdin> Format: Mach-O 32-bit i386 Arch: i386 AddressSize: 32bit Indirect Symbols { Number: 3 Symbols [ Entry { Entry Index: 0 Symbol Index: 0x4 } Entry { Entry Index: 1 Symbol Index: 0x0 } Entry { Entry Index: 2 Symbol Index: 0x1 } ] } Differential Revision: http://reviews.llvm.org/D12570 llvm-svn: 246789
* [WinEH] Add cleanupendpad instructionJoseph Tremoulet2015-09-031-0/+1
| | | | | | | | | | | | | | | | | | | | | | | Summary: Add a `cleanupendpad` instruction, used to mark exceptional exits out of cleanups (for languages/targets that can abort a cleanup with another exception). The `cleanupendpad` instruction is similar to the `catchendpad` instruction in that it is an EH pad which is the target of unwind edges in the handler and which itself has an unwind edge to the next EH action. The `cleanupendpad` instruction, similar to `cleanupret` has a `cleanuppad` argument indicating which cleanup it exits. The unwind successors of a `cleanuppad`'s `cleanupendpad`s must agree with each other and with its `cleanupret`s. Update WinEHPrepare (and docs/tests) to accomodate `cleanupendpad`. Reviewers: rnk, andrew.w.kaylor, majnemer Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D12433 llvm-svn: 246751
* [llvm-reaodbj] Simplify code. No functional change (intended).Davide Italiano2015-09-021-24/+8
| | | | llvm-svn: 246676
* Reapply r246012 [dsymutil] Emit real dSYM companion binaries.Frederic Riss2015-09-023-3/+439
| | | | | | | | | | | | | | | | | | | | | | | With a fix for big endian machines. Thanks to Daniel Sanders for the debugging! Original commit message: The binaries containing the linked DWARF generated by dsymutil are not standard relocatable object files like emitted did previsously. They should be dSYM companion files, which means they have a different file type in the header, but also a couple other peculiarities: - they contain the segments and sections from the original binary in their load commands, but not the actual contents. This means they get an address and a size, but their offset is always 0 (but these are not virtual sections) - they also conatin all the defined symbols from the original binary This makes MC a really bad fit to emit these kind of binaries. The approach that was used in this patch is to leverage MC's section layout for the debug sections, but to use a replacement for MachObjectWriter that lives in MachOUtils.cpp. Some of the low-level helpers from MachObjectWriter were reused too. llvm-svn: 246673
OpenPOWER on IntegriCloud