summaryrefslogtreecommitdiffstats
path: root/llvm/test/tools
Commit message (Collapse)AuthorAgeFilesLines
...
* [dsymutil] Emit real dSYM companion binaries.Frederic Riss2015-08-262-0/+339
| | | | | | | | | | | | | | | | | | | 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: 246012
* [dsymutil] Store an optional BinaryPath in the debug map.Frederic Riss2015-08-262-0/+5
| | | | | | | | | llvm-dsymutil needs to emit dSYM companion bundles. These are binary files that replicate some of the orignal binary file properties (sections and symbols). To get acces to these properties, pass the binary path in the debug map. llvm-svn: 246011
* [dsymutil] actually fix test.Frederic Riss2015-08-251-2/+1
| | | | | | Not all machines have lipo installed. Do not try to invoke it. llvm-svn: 245991
* [dsymutil] Reapply r245960.Frederic Riss2015-08-253-1/+25
| | | | | | | | | | | | | | | | | | There was an issue in the test setup because the test requires an arch that wasn't filtered by the lit.local.cfg, but given the set of bots that failed, I'm not confident this is the (only) issue. So this commit also adds more output to the test to help me track down the failure if it happens again. Original commit message: [dsymutil] Rewrite thumb triple names in user visible messages. We autodetect triples from the input file(s) while reading the mach-o debug map. As we need to create a Target from those triples, we always chose the thumb variant (because the arm variant might not be 'instantiable' eg armv7m). The user visible architecture names should still be 'arm' and not 'thumb' variants though. llvm-svn: 245988
* Revert "[dsymutil] Rewrite thumb triple names in user visible messages."Frederic Riss2015-08-252-22/+1
| | | | | | | | This reverts commit r245960. Multiple bots are failing on the new test. It seemd like llvm-dsymutil exits with an error. Investigating. llvm-svn: 245964
* [dsymutil] Rewrite thumb triple names in user visible messages.Frederic Riss2015-08-252-1/+22
| | | | | | | | | | We autodetect triples from the input file(s) while reading the mach-o debug map. As we need to create a Target from those triples, we always chose the thumb variant (because the arm variant might not be 'instantiable' eg armv7m). The user visible architecture names should still be 'arm' and not 'thumb' variants though. llvm-svn: 245960
* [dsymutil] Not finding any debug info is not a fatal errorFrederic Riss2015-08-251-0/+8
| | | | llvm-svn: 245959
* [dsymutil] Remove old ODR uniquing testsFrederic Riss2015-08-2316-1190/+0
| | | | | | | These tests have been obsoleted by the refactored versions introduced in the previous commit. llvm-svn: 245804
* [dsymutil] Refactor ODR uniquing tests to be more readable.Frederic Riss2015-08-2311-0/+385
| | | | | | | | | This patch adds all the refactored tests in new files, the old tests will be removed by a followup commit. Thanks to D. Blaikie for all the feedback. llvm-svn: 245803
* TransformUtils: Introduce module splitter.Peter Collingbourne2015-08-216-0/+114
| | | | | | | | | | | | | The module splitter splits a module into linkable partitions. It will be used to implement parallel LTO code generation. This initial version of the splitter does not attempt to deal with the somewhat subtle symbol visibility issues around module splitting. These will be dealt with in a future change. Differential Revision: http://reviews.llvm.org/D12132 llvm-svn: 245662
* Enable five passing dsymutil tests on Windows. Yaron Keren2015-08-115-5/+0
| | | | | | | These tests pass with Windows 7 x64 + MSYS2. I'll see if the bots like them as well and disable the failing ones. llvm-svn: 244572
* [llvm-symbolizer] Remove underscores and other C mangling on WindowsReid Kleckner2015-08-105-18/+37
| | | | | | | | | | | | | | | Summary: This makes it so that reports symbolized after the fact with llvm-symbolizer are more similar to the ones we generate at runtime with in-process dbghelp. Reviewers: samsonov Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D11785 llvm-svn: 244512
* Fix a bunch of trivial cases of 'CHECK[^:]*$' in the tests. NFCIJonathan Roelofs2015-08-101-1/+1
| | | | | | | I looked into adding a warning / error for this to FileCheck, but there doesn't seem to be a good way to avoid it triggering on the instances of it in RUN lines. llvm-svn: 244481
* [dsymutil] Use the new MCDwarfLineTableParams customization to emit linetablesFrederic Riss2015-08-073-0/+46
| | | | | | | | llvm-dsymutil has to be able to process debug info produced by other compilers which use different line table settings. The testcase wasn't generated by another compiler, but by a modified clang. llvm-svn: 244319
* Tweak llvm/test/tools/dsymutil/arch-option.test to avoid globbing on mingw-w64.NAKAMURA Takumi2015-08-071-1/+1
| | | | llvm-svn: 244311
* ELF: Add AMDGPU specific defintionsTom Stellard2015-08-072-0/+28
| | | | | | | | | | Reviewers: rafael Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D11458 llvm-svn: 244303
* [dsymutil] Implement dSYM bundle creationFrederic Riss2015-08-062-11/+64
| | | | | | | | | | | | | | A dSYM bundle is a file hierarchy that looks slike this: <bundle name>.dSYM/ Contents/ Info.plist Resources/ DWARF/ <DWARF file(s)> This is the default output mode of dsymutil. llvm-svn: 244270
* [dsymutil] Add (unimplemented) --flat optionFrederic Riss2015-08-0612-19/+19
| | | | | | | | | | | | | | dsymutil should by default generate dSYM bundles which are filesystem hierarchies containing the debug info and an additional Info.plist. Currently llvm-dsymutil emits raw binaries containing the debug info. This is what we call the 'flat mode'. Add a -f/-flat option that is supposed to enable that flat mode, but don't wire it for now, only pass it to the tests that will need it to stay functional once we do bundle generation by default. This basically makes this commit NFC and removes the noise from the actual commit that adds support for bundle generation. llvm-svn: 244269
* COFF: Assign the correct symbol type to internal functions.Peter Collingbourne2015-08-062-0/+3
| | | | | | | | | | | The COFFSymbolRef::isFunctionDefinition() function tests for several conditions that are not related to whether a symbol is a function, but rather whether the symbol meets the requirements for a function definition auxiliary record, which excludes certain symbols such as internal functions and undefined references. The test we need to determine the symbol type is much simpler: we only need to compare the complex type against IMAGE_SYM_DTYPE_FUNCTION. llvm-svn: 244195
* Revert "Make sure all temporary files get created under %T."Frederic Riss2015-08-051-3/+1
| | | | | | | | | This reverts commit r244163. The workaround shouldn't be necessary after r244172, and moreover the commit was slightly buggy as it dis a simple mkdir without removing the directory first, which could cause 'File exists' errors. llvm-svn: 244182
* [dsymutil] Update source used to generate test binary.Frederic Riss2015-08-051-2/+13
| | | | | | Forgot to include that in the last commit. llvm-svn: 244171
* Make sure all temporary files get created under %T.Artem Belevich2015-08-051-1/+3
| | | | llvm-svn: 244163
* [dsymutil] Add support for the -arch option.Frederic Riss2015-08-053-0/+39
| | | | | | | | This option allows to select a subset of the architectures when performing a universal binary link. The filter is done completely in the mach-o specific part of the code. llvm-svn: 244160
* [dsymutil] Fix test patterns.Frederic Riss2015-08-051-3/+3
| | | | | | | Depending on the filesystem paths, the YAML dump might quote paths. Account for that in the regex patterns. llvm-svn: 244094
* [dsymutil] Implement support for handling mach-o universal binaries as main ↵Frederic Riss2015-08-052-0/+32
| | | | | | | | | | | | | | | | | input/output. The DWARF linker isn't touched by this, the implementation links individual files and merges them together into a fat binary by calling out to the 'lipo' utility. The main change is that the MachODebugMapParser can now return multiple debug maps for a single binary. The test just verifies that lipo would be invoked correctly, but doesn't actually generate a binary. This mimics the way clang tests its external iplatform tools integration. llvm-svn: 244087
* Update test suite to make "ninja check" succeed without native backend builtinMehdi Amini2015-08-044-1/+4
| | | | | | | Requires "native" feature in most places that were failing. From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 243960
* lto: Avoid relying on the environment for this testJustin Bogner2015-08-031-2/+2
| | | | | | | It's better to pass libLTO to ld64 via the command line flag than rely on setting DYLD_LIBRARY_PATH. llvm-svn: 243911
* DI: Disallow uniquable DICompileUnitsDuncan P. N. Exon Smith2015-08-032-2/+2
| | | | | | | | | | | | | | | | | | Since r241097, `DIBuilder` has only created distinct `DICompileUnit`s. The backend is liable to start relying on that (if it hasn't already), so make uniquable `DICompileUnit`s illegal and automatically upgrade old bitcode. This is a nice cleanup, since we can remove an unnecessary `DenseSet` (and the associated uniquing info) from `LLVMContextImpl`. Almost all the testcases were updated with this script: git grep -e '= !DICompileUnit' -l -- test | grep -v test/Bitcode | xargs sed -i '' -e 's,= !DICompileUnit,= distinct !DICompileUnit,' I imagine something similar should work for out-of-tree testcases. llvm-svn: 243885
* Fix the test added at r243777.Alexander Kornienko2015-08-031-2/+2
| | | | | | | When RUN: lines are split into multiple lines, each one must be prefixed with RUN:. llvm-svn: 243868
* [Mips] Support DT_MIPS_RLD_MAP_REL dynamic section tag in the llvm-readobjSimon Atanasyan2015-08-012-0/+24
| | | | llvm-svn: 243833
* [dsymutil] Support multiple input files on the command lineFrederic Riss2015-07-312-0/+13
| | | | llvm-svn: 243777
* DI: Remove DW_TAG_arg_variable and DW_TAG_auto_variableDuncan P. N. Exon Smith2015-07-319-29/+29
| | | | | | | | | | | | | | | | | | | | | | | | Remove the fake `DW_TAG_auto_variable` and `DW_TAG_arg_variable` tags, using `DW_TAG_variable` in their place Stop exposing the `tag:` field at all in the assembly format for `DILocalVariable`. Most of the testcase updates were generated by the following sed script: find test/ -name "*.ll" -o -name "*.mir" | xargs grep -l 'DILocalVariable' | xargs sed -i '' \ -e 's/tag: DW_TAG_arg_variable, //' \ -e 's/tag: DW_TAG_auto_variable, //' There were only a handful of tests in `test/Assembly` that I needed to update by hand. (Note: a follow-up could change `DILocalVariable::DILocalVariable()` to set the tag to `DW_TAG_formal_parameter` instead of `DW_TAG_variable` (as appropriate), instead of having that logic magically in the backend in `DbgVariable`. I've added a FIXME to that effect.) llvm-svn: 243774
* [dsymutil] Rename -v option to -verboseFrederic Riss2015-07-294-10/+10
| | | | | | | | | | | | The dsymutil-classic -v option dumps the tool version rather than putting it in verbose mode. Rename -v to -verbose and update the tests that use it (in the process removing it from a few tests that didn't require it anymore since the -dump-debug-map option was introduced). A followup commit will reintroduce the -v option that dumps the version. llvm-svn: 243582
* [llvm-objdump] Merging MachO DumpSections in to FilterSections. Simplifying ↵Colin LeMahieu2015-07-291-1/+1
| | | | | | some predicate logic. llvm-svn: 243556
* [llvm-objdump] Added -j flag to filter sections that are operated on.Colin LeMahieu2015-07-292-0/+7
| | | | llvm-svn: 243526
* [llvm-mc] Add --no-warn flag with -W alias to disable outputting warnings ↵Colin LeMahieu2015-07-271-0/+5
| | | | | | while assembling. llvm-svn: 243338
* [llvm-mc] Pushing plumbing through for --fatal-warnings flag.Colin LeMahieu2015-07-271-0/+5
| | | | llvm-svn: 243334
* llvm/test/tools/dsymutil/ARM/lit.local.cfg: Fix possibly typo, s/X86/ARM/.NAKAMURA Takumi2015-07-241-1/+1
| | | | llvm-svn: 243106
* [dsymutil] Implement support for universal mach-o object files.Frederic Riss2015-07-248-0/+80
| | | | | | | | | | | | | This patch allows llvm-dsymutil to read universal (aka fat) macho object files and archives. The patch touches nearly everything in the BinaryHolder, but it is fairly mechinical: the methods that returned MemoryBufferRefs or ObjectFiles now return a vector of those, and the high-level access function takes a triple argument to select the architecture. There is no support yet for handling fat executables and thus no support for writing fat object files. llvm-svn: 243096
* [dsymutil] Make the triple detection more strict.Frederic Riss2015-07-246-10/+10
| | | | | | | | MachOObjectFile offers a method for detecting the correct triple, use it instead of the previous approximation. This doesn't matter right now, but it will become important for mach-o universal (fat) binaries. llvm-svn: 243095
* Moving tests in to X86 directory.Colin LeMahieu2015-07-232-0/+0
| | | | llvm-svn: 243049
* Using an input object file instead of trying to generate an object file.Colin LeMahieu2015-07-232-5/+2
| | | | llvm-svn: 243044
* Specifying a test triple.Colin LeMahieu2015-07-231-1/+2
| | | | llvm-svn: 243042
* [llvm-objdump] Add -D and --disassemble-all flags that attempt disassembly ↵Colin LeMahieu2015-07-231-0/+6
| | | | | | on all sections instead of just text sections. llvm-svn: 243041
* [dsymutil] Check archive members timestamps.Frederic Riss2015-07-222-0/+27
| | | | | | | | | The debug map contains the timestamp of the object files in references. We do not check these in the general case, but it's really useful if you have archives where different versions of an object file have been appended. This allows llvm-dsymutil to find the right one. llvm-svn: 242965
* [dsymutil] Implement ODR uniquing for C++ code.Frederic Riss2015-07-2116-0/+1190
| | | | | | | | | | | | | | | | | This optimization allows the DWARF linker to reuse definition of types it has emitted in previous CUs rather than reemitting them in each CU that references them. The size and link time gains are huge. For example when linking the DWARF for a debug build of clang, this generates a ~150M dwarf file instead of a ~700M one (the numbers date back a bit and must not be totally accurate these days). As with all the other parts of the llvm-dsymutil codebase, the goal is to keep bit-for-bit compatibility with dsymutil-classic. The code is littered with a lot of FIXMEs that should be addressed once we can get rid of the compatibilty goal. llvm-svn: 242847
* [llvm-readobj] Print MIPS PLT tableSimon Atanasyan2015-07-092-0/+34
| | | | | | Now the -mips-plt-got prints both MIPS GOT and PLT tables. llvm-svn: 241836
* [CodeView] Add support for emitting column informationDavid Majnemer2015-07-091-0/+10
| | | | | | | | | | Column information is present in CodeView when the line table subsection has bit 0 set to 1 in it's flags field. The column information is represented as a pair of 16-bit quantities: a starting and ending column. This information is present at the end of the chunk, after all the line-PC pairs. llvm-svn: 241764
* llvm-objdump: Replace the -macho -raw option with a generic -raw-clang-astAdrian Prantl2015-07-081-2/+0
| | | | | | | | | | | | | | | option that works with all object container formats. Now that clang modules/PCH are object containers this option is useful to to construct pipes like llvm-objdump -raw-clang-ast foo.pcm | llvm-bcanalyzer - to inspect the AST contents in a PCH container. Will be tested via clang. Belatedly addresses review feedback for r233390. llvm-svn: 241659
* Pass -m to the linker in this test.Rafael Espindola2015-06-231-1/+1
| | | | | | Fixes the test on a ppc host. llvm-svn: 240431
OpenPOWER on IntegriCloud