summaryrefslogtreecommitdiff
path: root/test/Linker
Commit message (Collapse)AuthorAge
* DebugInfo: Remove some unneeded conditionals now that DIBuilder no longer ↵David Blaikie2014-02-04
| | | | | | | | | | | emits zero-length arrays as {i32 0} A bunch of test cases needed to be cleaned up for this, many my fault - when implementid imported modules I updated test cases by simply duplicating the prior metadata field - which wasn't always the empty metadata entry. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200731 91177308-0d34-0410-b5e6-96231b3b80d8
* Reland r200340 - 'Add line table debug info to COFF files when using a win32 ↵Timur Iskhodzhanov2014-01-30
| | | | | | | | triple' This incorporates a couple of fixes reviewed at http://llvm-reviews.chandlerc.com/D2651 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200440 91177308-0d34-0410-b5e6-96231b3b80d8
* Verify that attributes are not lost during linking.Bill Wendling2014-01-24
| | | | | | | | We don't want to lose attributes when a function decl without them is merged with a function decl that has them. PR2382 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200030 91177308-0d34-0410-b5e6-96231b3b80d8
* Debug info (LTO): Move the creation of accessibility flags toAdrian Prantl2014-01-18
| | | | | | | | | getOrCreateSubprogramDIE to avoid attributes being added twice when DIEs are merged. rdar://problem/15842330. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199536 91177308-0d34-0410-b5e6-96231b3b80d8
* Debug Info: update testing cases to specify the debug info version number.Manman Ren2013-11-22
| | | | | | | | | We are going to drop debug info without a version number or with a different version number, to make sure we don't crash when we see bitcode files with different debug info metadata format. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195504 91177308-0d34-0410-b5e6-96231b3b80d8
* Debug Info: remove duplication of DIEs when a DIE can be shared across CUs.Manman Ren2013-10-31
| | | | | | | | | | | | | | | | | | | | We add a map in DwarfDebug to map MDNodes that are shareable across CUs to the corresponding DIEs: MDTypeNodeToDieMap. These DIEs can be shared across CUs, that is why we keep the maps in DwarfDebug instead of CompileUnit. We make the assumption that if a DIE is not added to an owner yet, we assume it belongs to the current CU. Since DIEs for the type system are added to their owners immediately after creation, and other DIEs belong to the current CU, the assumption should be true. A testing case is added to show that we only create a single DIE for a type MDNode and we use ref_addr to refer to the type DIE. We also add a testing case to show ref_addr relocations for non-darwin platforms. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193779 91177308-0d34-0410-b5e6-96231b3b80d8
* Debug Info: In DIBuilder, the derived-from field of a DW_TAG_pointer_typeManman Ren2013-10-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | is updated to use DITypeRef. Move isUnsignedDIType and getOriginalTypeSize from DebugInfo.h to be static helper functions in DwarfCompileUnit. We already have a static helper function "isTypeSigned" in DwarfCompileUnit, and a pointer to DwarfDebug is added to resolve the derived-from field. All three functions need to go across link for derived-from fields, so we need to get hold of a type identifier map. A pointer to DwarfDebug is also added to DbgVariable in order to resolve the derived-from field. Debug info verifier is updated to check a derived-from field is a TypeRef. Verifier will not go across link for derived-from fields, in debug info finder, we go across the link to add derived-from fields to types. Function getDICompositeType is only used by dragonegg and since dragonegg does not generate identifier for types, we use an empty map to resolve the derived-from field. When printing a derived-from field, we use DITypeRef::getName to either return the type identifier or getName of the DIType. A paired commit at clang is required due to changes to DIBuilder. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192018 91177308-0d34-0410-b5e6-96231b3b80d8
* Temporarily revert r191792 as it is causing some LTO debug failuresEric Christopher2013-10-04
| | | | | | | on platforms with relocations in debug info and also temporarily revert r191800 due to conflicts with the revert of r191792. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191967 91177308-0d34-0410-b5e6-96231b3b80d8
* Debug Info: In DIBuilder, the derived-from field of a DW_TAG_pointer_typeManman Ren2013-10-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | is updated to use DITypeRef. Move isUnsignedDIType and getOriginalTypeSize from DebugInfo.h to be static helper functions in DwarfCompileUnit. We already have a static helper function "isTypeSigned" in DwarfCompileUnit, and a pointer to DwarfDebug is added to resolve the derived-from field. All three functions need to go across link for derived-from fields, so we need to get hold of a type identifier map. A pointer to DwarfDebug is also added to DbgVariable in order to resolve the derived-from field. Debug info verifier is updated to check a derived-from field is a TypeRef. Verifier will not go across link for derived-from fields, in debug info finder, we go across the link to add derived-from fields to types. Function getDICompositeType is only used by dragonegg and since dragonegg does not generate identifier for types, we use an empty map to resolve the derived-from field. When printing a derived-from field, we use DITypeRef::getName to either return the type identifier or getName of the DIType. A paired commit at clang is required due to changes to DIBuilder. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191800 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove triple from type unique testing cases.Manman Ren2013-10-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191794 91177308-0d34-0410-b5e6-96231b3b80d8
* Try to fix native-arm botManman Ren2013-10-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191793 91177308-0d34-0410-b5e6-96231b3b80d8
* Debug Info: remove duplication of DIEs when a DIE is part of the type systemManman Ren2013-10-01
| | | | | | | | | | | | | | | | | | | | | | | | and it is shared across CUs. We add a few maps in DwarfDebug to map MDNodes for the type system to the corresponding DIEs: MDTypeNodeToDieMap, MDSPNodeToDieMap, and MDStaticMemberNodeToDieMap. These DIEs can be shared across CUs, that is why we keep the maps in DwarfDebug instead of CompileUnit. Sometimes, when we try to add an attribute to a DIE, the DIE is not yet added to its owner yet, so we don't know whether we should use ref_addr or ref4. We create a worklist that will be processed during finalization to add attributes with the correct form (ref_addr or ref4). We add addDIEEntry to DwarfDebug to be a wrapper around DIE->addValue. It checks whether we know the correct form, if not, we update the worklist (DIEEntryWorklist). A testing case is added to show that we only create a single DIE for a type MDNode and we use ref_addr to refer to the type DIE. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191792 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement function prefix data as an IR feature.Peter Collingbourne2013-09-16
| | | | | | | | | Previous discussion: http://lists.cs.uiuc.edu/pipermail/llvmdev/2013-July/063909.html Differential Revision: http://llvm-reviews.chandlerc.com/D1191 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190773 91177308-0d34-0410-b5e6-96231b3b80d8
* Debug Info: In DIBuilder, the context fields of a TAG_inheritance and aManman Ren2013-09-09
| | | | | | | | | TAG_friend are updated to use scope reference. Added testing cases to verify that class with inheritance can be uniqued. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190364 91177308-0d34-0410-b5e6-96231b3b80d8
* Debug Info Testing: remove a commented out line.Manman Ren2013-09-09
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190351 91177308-0d34-0410-b5e6-96231b3b80d8
* Debug Info: Use DIScopeRef for DIType::getContext.Manman Ren2013-09-09
| | | | | | | | | | | | | | | | | | In DIBuilder, the context field of a TAG_member is updated to use the scope reference. Verifier is updated accordingly. DebugInfoFinder now needs to generate a type identifier map to have access to the actual scope. Same applies for BreakpointPrinter. processModule of DebugInfoFinder is called during initialization phase of the verifier to make sure the type identifier map is constructed early enough. We are now able to unique a simple class as demonstrated by the added testing case. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190334 91177308-0d34-0410-b5e6-96231b3b80d8
* Debug Info Testing: update context from empty string to null.Manman Ren2013-09-08
| | | | | | | Context should be either null or MDNode. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190267 91177308-0d34-0410-b5e6-96231b3b80d8
* Debug Info Testing: updated to use NULL instead of "i32 0" in a few fields.Manman Ren2013-09-06
| | | | | | | | | Field 2 of DIType (Context), field 9 of DIDerivedType (TypeDerivedFrom), field 12 of DICompositeType (ContainingType), fields 2, 7, 12 of DISubprogram (Context, Type, ContainingType). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190205 91177308-0d34-0410-b5e6-96231b3b80d8
* Error on linking appending globals with different unnamed_addr.Rafael Espindola2013-09-04
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189950 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix linking of unnamed_addr in functions.Rafael Espindola2013-09-04
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189945 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename in preparation for adding tests for function linking.Rafael Espindola2013-09-04
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189944 91177308-0d34-0410-b5e6-96231b3b80d8
* Use CHECK-DAG instead of sort.Rafael Espindola2013-09-04
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189942 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix linking of unnamed_addr.Rafael Espindola2013-09-04
| | | | | | | | This was regression from r134829. When linking we have to be conservative. If one of the symbols has a significant address, then the result should have it too. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189935 91177308-0d34-0410-b5e6-96231b3b80d8
* [tests] Use multiple statements instead of 'echo -e', which is not part of ↵Daniel Dunbar2013-08-29
| | | | | | BSD echo. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189560 91177308-0d34-0410-b5e6-96231b3b80d8
* Debug Info: add an identifier field to DICompositeType.Manman Ren2013-08-26
| | | | | | | | | | | | | | | | | | | DICompositeType will have an identifier field at position 14. For now, the field is set to null in DIBuilder. For DICompositeTypes where the template argument field (the 13th field) was optional, modify DIBuilder to make sure the template argument field is set. Now DICompositeType has 15 fields. Update DIBuilder to use NULL instead of "i32 0" for null value of a MDNode. Update verifier to check that DICompositeType has 15 fields and the last field is null or a MDString. Update testing cases to include an extra field for DICompositeType. The identifier field will be used by type uniquing so a front end can genearte a DICompositeType with a unique identifer. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189282 91177308-0d34-0410-b5e6-96231b3b80d8
* [tests] Cleanup initialization of test suffixes.Daniel Dunbar2013-08-16
| | | | | | | | | | | | | | | | | - 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
* Debug Info Verifier: enable verification of DICompileUnit.Manman Ren2013-07-26
| | | | | | | | | We used to call Verify before adding DICompileUnit to the list, and now we remove the check and always add DICompileUnit to the list in DebugInfoFinder, so we can verify them later on. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187237 91177308-0d34-0410-b5e6-96231b3b80d8
* Debug Info: improve the verifier to check field types.Manman Ren2013-07-25
| | | | | | | | Make sure the context field of DIType is MDNode. Fix testing cases to make them pass the verifier. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187150 91177308-0d34-0410-b5e6-96231b3b80d8
* Update testing cases to pass debug info verifier.Manman Ren2013-07-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187083 91177308-0d34-0410-b5e6-96231b3b80d8
* Debug Info: improve the Finder.Manman Ren2013-07-23
| | | | | | | | Improve the Finder to handle context of a DIVariable. If Scope is a DICompileUnit, add it to the list of CUs. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187003 91177308-0d34-0410-b5e6-96231b3b80d8
* Debug Info Finder: use processDeclare and processValue to list debug infoManman Ren2013-07-23
| | | | | | | | | | | | MDNodes used by DbgDeclareInst and DbgValueInst. Another 16 testing cases failed and they are disabled with -disable-debug-info-verifier. A total of 34 cases are disabled with -disable-debug-info-verifier and will be corrected. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186902 91177308-0d34-0410-b5e6-96231b3b80d8
* Extend RemapInstruction and friends to take an optional new parameter, a ↵James Molloy2013-05-28
| | | | | | | | ValueMaterializer. Extend LinkModules to pass a ValueMaterializer to RemapInstruction and friends to lazily create Functions for lazily linked globals. This is a big win when linking small modules with large (mostly unused) library modules. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182776 91177308-0d34-0410-b5e6-96231b3b80d8
* Rewrite test/Linker tests to use FileCheck instead of grep.Eli Bendersky2013-04-09
| | | | | | | | | | | | Some translations here are not 1x1 because there are grep|grep chains that are non-trivial to implement in terms of FileCheck features. I made an effort for the tests to remain as similar as possible; do let me know if you notice anything fishy. The good news are that some buggy tests were fixed (grep | not grep - a bug waiting to happen). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179102 91177308-0d34-0410-b5e6-96231b3b80d8
* Linker: correctly link in dbg.declareManman Ren2013-01-31
| | | | | | | | | | | | | | | | | | | | This is a re-worked version of r174048. Given source IR: call void @llvm.dbg.declare(metadata !{i32* %argc.addr}, metadata !14), !dbg !15 we used to generate call void @llvm.dbg.declare(metadata !27, metadata !28), !dbg !29 !27 = metadata !{null} With this patch, we will correctly generate call void @llvm.dbg.declare(metadata !{i32* %argc.addr}, metadata !27), !dbg !28 Looking up %argc.addr in ValueMap will return null, since %argc.addr is already correctly set up, we can use identity mapping. rdar://problem/13089880 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174093 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r173946. This breaks compilation of googletest with ClangAlexey Samsonov2013-01-31
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174048 91177308-0d34-0410-b5e6-96231b3b80d8
* Linker: correctly link in dbg.declareManman Ren2013-01-30
| | | | | | | | | | | | | | | | | Given source IR: call void @llvm.dbg.declare(metadata !{i32* %argc.addr}, metadata !14), !dbg !15 we used to generate call void @llvm.dbg.declare(metadata !27, metadata !28), !dbg !29 !27 = metadata !{null} With this patch, we will correctly generate call void @llvm.dbg.declare(metadata !{i32* %argc.addr}, metadata !27), !dbg !28 Looking up %argc.addr in ValueMap will return null, since %argc.addr is already correctly set up, we can use identity mapping. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173946 91177308-0d34-0410-b5e6-96231b3b80d8
* [IR] Add 'Append' and 'AppendUnique' module flag behaviors.Daniel Dunbar2013-01-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172659 91177308-0d34-0410-b5e6-96231b3b80d8
* [Linker] Change module flag linking to be more extensible.Daniel Dunbar2013-01-16
| | | | | | | | | | - Instead of computing a bunch of buckets of different flag types, just do an incremental link resolving conflicts as they arise. - This also has the advantage of making the link result deterministic and not dependent on map iteration order. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172634 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a copy/paste error in the IR Linker, casting an ArrayType instead of a ↵Joey Gouly2013-01-10
| | | | | | VectorType. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172054 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove the dependent libraries feature.Bill Wendling2012-11-27
| | | | | | | The dependent libraries feature was never used and has bit-rotted. Remove it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168694 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert the uses of '|&' to use '2>&1 |' instead, which works on oldChandler Carruth2012-07-02
| | | | | | | | | | versions of Bash. In addition, I can back out the change to the lit built-in shell test runner to support this. This should fix the majority of fallout on Darwin, but I suspect there will be a few straggling issues. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159544 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert all tests using TCL-style quoting to use shell-style quoting.Chandler Carruth2012-07-02
| | | | | | | | | | | | | | | | | | | | | | | | This was done through the aid of a terrible Perl creation. I will not paste any of the horrors here. Suffice to say, it require multiple staged rounds of replacements, state carried between, and a few nested-construct-parsing hacks that I'm not proud of. It happens, by luck, to be able to deal with all the TCL-quoting patterns in evidence in the LLVM test suite. If anyone is maintaining large out-of-tree test trees, feel free to poke me and I'll send you the steps I used to convert things, as well as answer any painful questions etc. IRC works best for this type of thing I find. Once converted, switch the LLVM lit config to use ShTests the same as Clang. In addition to being able to delete large amounts of Python code from 'lit', this will also simplify the entire test suite and some of lit's architecture. Finally, the test suite runs 33% faster on Linux now. ;] For my 16-hardware-thread (2x 4-core xeon e5520): 36s -> 24s git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159525 91177308-0d34-0410-b5e6-96231b3b80d8
* Switch a bunch of Linker tests from using elaborate echo productions toChandler Carruth2012-07-02
| | | | | | | | | | | | | | | | just provide and reference separate input files from an Inputs subdirectory. This pattern works very well in the Clang tree and is easier to understand in my opinion. It also has fewer limitations and will remove one particularly annoying use of TCL-style {} quoting from the testsuite. Also teach the LLVM lit configuration to avoid recursing into 'Inputs' subdirectories. This wasn't required for the previous 'Inputs' subdirectories used due to fortuitous suffix patterns. This is the first step to completely removing support for TCL-style tests. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159520 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove llvm-ld and llvm-stub (which is only used by llvm-ld).Michael J. Spencer2012-04-19
| | | | | | | | | | | | | | | | llvm-ld is no longer useful and causes confusion and so it is being removed. * Does not work very well on Windows because it must call a gcc like driver to assemble and link. * Has lots of hard coded paths which are wrong on many systems. * Does not understand most of ld's options. * Can be partially replaced by llvm-link | opt | {llc | as, llc -filetype=obj} | ld, or fully replaced by Clang. I know of no production use of llvm-ld, and hacking use should be replaced by Clang's driver. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@155147 91177308-0d34-0410-b5e6-96231b3b80d8
* Add back removed code. It still causes LLVM to miscompile. But not having it ↵Bill Wendling2012-02-27
| | | | | | breaks other things. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151594 91177308-0d34-0410-b5e6-96231b3b80d8
* XFAIL test until <rdar://problem/10913281> is fixed.Bill Wendling2012-02-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151578 91177308-0d34-0410-b5e6-96231b3b80d8
* Replace all instances of dg.exp file with lit.local.cfg, since all tests are ↵Eli Bendersky2012-02-16
| | | | | | | | | | | run with LIT now and now Dejagnu. dg.exp is no longer needed. Patch reviewed by Daniel Dunbar. It will be followed by additional cleanup patches. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150664 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove extraneous tests.Bill Wendling2012-02-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150636 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a test for the Objective-C garbage collection metadata stuff.Bill Wendling2012-02-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150626 91177308-0d34-0410-b5e6-96231b3b80d8
* Change error tests to coincide with message changes.Bill Wendling2012-02-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150467 91177308-0d34-0410-b5e6-96231b3b80d8