summaryrefslogtreecommitdiffstats
path: root/llvm/test/tools
Commit message (Collapse)AuthorAgeFilesLines
* 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
* objdump: Don't print a (always 0) size for MachO symbols.Rafael Espindola2015-06-231-5/+5
| | | | | | | | | | | Only common symbol on MachO and COFF have a size. For COFF we already had a custom format. For MachO, there is no native objdump and we were printing it as ELF. Now we only print the sizes for symbols that actually have them. llvm-svn: 240422
* Add a test for the previous commit.Rafael Espindola2015-06-231-0/+3
| | | | | | This shows how two symbols at the same address are handled. llvm-svn: 240374
* Fix tests when X86 is not enabled.Rafael Espindola2015-06-232-0/+2
| | | | llvm-svn: 240368
* Compute correct symbol sizes for MachO and COFF.Rafael Espindola2015-06-231-0/+44
| | | | | | Before this would dump from the symbol start to the end of the section. llvm-svn: 240367
* [Object] Search for architecures by name in ↵Frederic Riss2015-06-223-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | MachOUniversalBinary::getObjectForArch() The reason we need to search by name rather than by Triple::ArchType is to handle subarchitecture correclty. There is no different ArchType for the x86_64h architecture (it identifies itself as x86_64), or for the various ARM subarches. The only way to get to the subarch slice in an universal binary is to search by name. This issue led to hard to debug and transient symbolication failures in Asan tests (it mostly works, because the files are very similar). This also affects the Profiling infrastucture as it is the other user of that API. Reviewers: samsonov, bogner Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D10604 llvm-svn: 240339
* Add a triple to the test to fix it on some hosts.Rafael Espindola2015-06-221-1/+1
| | | | | | | | The slp vectorizer doesn't optimize this case in 32 bits. Fixes PR23453. llvm-svn: 240289
* Improve the --expand-relocs handling of MachO.Rafael Espindola2015-06-182-168/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | In a relocation target can take 3 basic forms * A r_value in scattered relocations. * A symbol in external relocations. * A section is non-external relocations. Have the dump reflect that. With this change we go from CHECK-NEXT: Extern: 0 CHECK-NEXT: Type: X86_64_RELOC_SUBTRACTOR (5) CHECK-NEXT: Symbol: 0x2 CHECK-NEXT: Scattered: 0 To just // CHECK-NEXT: Type: X86_64_RELOC_SUBTRACTOR (5) // CHECK-NEXT: Section: __data (2) Since the relocation is with a section, we print the seciton name and don't need to say that it is not scattered or external. Someone motivated can add further special cases for things like ARM64_RELOC_ADDEND and ARM_RELOC_PAIR. llvm-svn: 240073
* Pass --expand-relocs to a few more tests.Rafael Espindola2015-06-182-44/+364
| | | | llvm-svn: 240069
* [llvm-readobj] Print MIPS .reginfo section contentSimon Atanasyan2015-06-162-0/+10
| | | | llvm-svn: 239856
* Have MachOObjectFile::isValidArch() accept armv7Frederic Riss2015-06-161-0/+1
| | | | llvm-svn: 239833
* gold-plugin: save the .o when given -save-temps.Rafael Espindola2015-06-151-0/+3
| | | | | | | The plugin now save the bitcode before and after optimizations and the .o that is passed to the linker. llvm-svn: 239726
* [dsymutil] Fix misspelled CHECK line.Frederic Riss2015-06-051-1/+1
| | | | llvm-svn: 239200
* [dsymutil] Add support for linking the debug_frame section.Frederic Riss2015-06-055-0/+231
| | | | | | | | | | | Linking the debug frame section is actually very easy as we just have to patch the start address in the FDE header and then copy the rest of the FDE without even looking at it. The only small complexity comes from the handling of the CIEs that we should unique across object file. This is also really easy by using a StringMap keyed on the raw contents of the CIE. llvm-svn: 239198
* [dsymutil] Have the YAML deserialization rewrite the object address of symbols.Frederic Riss2015-06-051-0/+44
| | | | | | | | | | | The main use of the YAML debug map format is for testing inside LLVM. If we have IR files in the tests used to generate object files, then we obviously don't know the addresses of the symbols inside the object files beforehand. This change lets the YAML import lookup the addresses in the object files and rewrite them. This will allow to have test that really don't need any binary input. llvm-svn: 239189
* [dsymutil] Handle the -oso-prepend-path option when the input is a YAML ↵Frederic Riss2015-06-052-2/+2
| | | | | | | | debug map All the tests using a YAML debug map will need this. llvm-svn: 239163
OpenPOWER on IntegriCloud