summaryrefslogtreecommitdiff
path: root/test/Linker
Commit message (Collapse)AuthorAge
* 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
* [WIP] Initial code for module flags.Bill Wendling2012-02-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Module flags are key-value pairs associated with the module. They include a 'behavior' value, indicating how module flags react when mergine two files. Normally, it's just the union of the two module flags. But if two module flags have the same key, then the resulting flags are dictated by the behaviors. Allowable behaviors are: Error Emits an error if two values disagree. Warning Emits a warning if two values disagree. Require Emits an error when the specified value is not present or doesn't have the specified value. It is an error for two (or more) llvm.module.flags with the same ID to have the Require behavior but different values. There may be multiple Require flags per ID. Override Uses the specified value if the two values disagree. It is an error for two (or more) llvm.module.flags with the same ID to have the Override behavior but different values. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150300 91177308-0d34-0410-b5e6-96231b3b80d8
* Link symbols with different visibilities according to the rules in theRafael Espindola2012-01-05
| | | | | | | | System V Application Binary Interface. This lets us use -fvisibility-inlines-hidden with LTO. Fixes PR11697. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147624 91177308-0d34-0410-b5e6-96231b3b80d8
* Now that PR11464 is fixed, reapply the patch to fix PR11464, Chris Lattner2011-12-20
| | | | | | | | | | merging types by name when we can. We still don't guarantee type name linkage but we do it when obviously the right thing to do. This makes LTO type names easier to read, for example. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146932 91177308-0d34-0410-b5e6-96231b3b80d8
* fix PR11464 by preventing the linker from mapping two different struct types ↵Chris Lattner2011-12-20
| | | | | | from the source module onto the same opaque destination type. An opaque type can only be resolved to one thing or another after all. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146929 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert 146728 as it's causing failures on some of the external bots as well as Chad Rosier2011-12-17
| | | | | | | | | | | | internal nightly testers. Original commit message: By popular demand, link up types by name if they are isomorphic and one is an autorenamed version of the other. This makes the IR easier to read, because we don't end up with random renamed versions of the types after LTO'ing a large app. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146838 91177308-0d34-0410-b5e6-96231b3b80d8
* By popular demand, link up types by name if they are isomorphic and one is anChris Lattner2011-12-16
| | | | | | | | autorenamed version of the other. This makes the IR easier to read, because we don't end up with random renamed versions of the types after LTO'ing a large app. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146728 91177308-0d34-0410-b5e6-96231b3b80d8
* Upgrade syntax of tests using volatile instructions to use 'load volatile' ↵Chris Lattner2011-11-27
| | | | | | instead of 'volatile load', which is archaic. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145171 91177308-0d34-0410-b5e6-96231b3b80d8
* Let this test pass even if 'int' is somewhere in its directory path.Nico Weber2011-10-15
| | | | | | | | | | | | | On my machine, grep matched: ; ModuleID = '/Volumes/MacintoshHD2/src/chrome-git/src/third_party/llvm/test/Linker/2011-08-18-unique-debug-type.ll' !9 = metadata !{i32 720932, null, metadata !"int", null, i32 0, i64 32, i64 32, i64 0, i32 0, i32 5} ; [ DW_TAG_base_type ] Explicitly filter out the ModuleID line. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142077 91177308-0d34-0410-b5e6-96231b3b80d8
* Use %% for literals in RUN lines.Andrew Trick2011-08-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138647 91177308-0d34-0410-b5e6-96231b3b80d8
* Testcase for PR10663.Duncan Sands2011-08-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138231 91177308-0d34-0410-b5e6-96231b3b80d8
* Add another test.Devang Patel2011-08-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137969 91177308-0d34-0410-b5e6-96231b3b80d8
* Add test to check type uniquing.Devang Patel2011-08-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137968 91177308-0d34-0410-b5e6-96231b3b80d8
* We need to map DebugLoc. It leads to Fuction * (through subprogram entry ↵Devang Patel2011-08-04
| | | | | | node) which should be appropriately mapped. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136910 91177308-0d34-0410-b5e6-96231b3b80d8
* Linke NamedMDNodes after linking global values as comment suggests.Devang Patel2011-08-04
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136909 91177308-0d34-0410-b5e6-96231b3b80d8
* fix rdar://9776316 - type remapping needed for inline asm blobs,Chris Lattner2011-07-15
| | | | | | | fixing some objc llvm-test crashes with LTO. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135324 91177308-0d34-0410-b5e6-96231b3b80d8
* Land the long talked about "type system rewrite" patch. ThisChris Lattner2011-07-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | patch brings numerous advantages to LLVM. One way to look at it is through diffstat: 109 files changed, 3005 insertions(+), 5906 deletions(-) Removing almost 3K lines of code is a good thing. Other advantages include: 1. Value::getType() is a simple load that can be CSE'd, not a mutating union-find operation. 2. Types a uniqued and never move once created, defining away PATypeHolder. 3. Structs can be "named" now, and their name is part of the identity that uniques them. This means that the compiler doesn't merge them structurally which makes the IR much less confusing. 4. Now that there is no way to get a cycle in a type graph without a named struct type, "upreferences" go away. 5. Type refinement is completely gone, which should make LTO much MUCH faster in some common cases with C++ code. 6. Types are now generally immutable, so we can use "Type *" instead "const Type *" everywhere. Downsides of this patch are that it removes some functions from the C API, so people using those will have to upgrade to (not yet added) new API. "LLVM 3.0" is the right time to do this. There are still some cleanups pending after this, this patch is large enough as-is. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134829 91177308-0d34-0410-b5e6-96231b3b80d8
* remove a test that doesn't make sense in the new world.Chris Lattner2011-07-09
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134818 91177308-0d34-0410-b5e6-96231b3b80d8
* Quote two greps which contain parentheses.Chandler Carruth2011-07-02
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134353 91177308-0d34-0410-b5e6-96231b3b80d8
* Correctly merge available_externally and regular definitions when they haveRafael Espindola2011-02-01
| | | | | | different visibilities. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124650 91177308-0d34-0410-b5e6-96231b3b80d8
* fix PR9015, a crash linking recursive metadata.Chris Lattner2011-01-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124099 91177308-0d34-0410-b5e6-96231b3b80d8
* Make everyone happy this time.Michael J. Spencer2011-01-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123599 91177308-0d34-0410-b5e6-96231b3b80d8
* Try and fix this test. For some reason llvm-ar thinks that the file exists whenMichael J. Spencer2011-01-16
| | | | | | | it shouldn't, but I have no way to verify that it doesn't actually exist on the buildbot. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123594 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "Archive: Replace all internal uses of PathV1 with PathV2. The ↵Michael J. Spencer2011-01-16
| | | | | | external API still uses PathV1." git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123557 91177308-0d34-0410-b5e6-96231b3b80d8
* one of michael's recent patches broke this, temporarily disableChris Lattner2011-01-16
| | | | | | | it so the bots go green git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123555 91177308-0d34-0410-b5e6-96231b3b80d8
* Allow unnamed_addr on declarations.Rafael Espindola2011-01-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123529 91177308-0d34-0410-b5e6-96231b3b80d8
* Keep unnamed_addr when linking.Rafael Espindola2011-01-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123364 91177308-0d34-0410-b5e6-96231b3b80d8