History log of /external/llvm/lib/Linker/LinkModules.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
573e97326766359d3a9747eed7b7d47b6c33fa0f 03-Aug-2012 Bill Wendling <isanbard@gmail.com> Move the "findUsedStructTypes" functionality outside of the Module class.

The "findUsedStructTypes" method is very expensive to run. It needs to be
optimized so that LTO can run faster. Splitting this method out of the Module
class will help this occur. For instance, it can keep a list of seen objects so
that it doesn't process them over and over again.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161228 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
ce718ff9f42c7da092eaa01dd0242e8d5ba84713 23-Jun-2012 Hans Wennborg <hans@hanshq.net> Extend the IL for selecting TLS models (PR9788)

This allows the user/front-end to specify a model that is better
than what LLVM would choose by default. For example, a variable
might be declared as

@x = thread_local(initialexec) global i32 42

if it will not be used in a shared library that is dlopen'ed.

If the specified model isn't supported by the target, or if LLVM can
make a better choice, a different model may be used.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159077 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
f24fde20c8d6db5a52b50a010e831c9159d3fec7 09-May-2012 Bill Wendling <isanbard@gmail.com> Supply a C interface to the "LinkModules" method.
Patch by Andrew Wilkins!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156469 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
d46575f1908b1fb9950e610a1f36733893ad44b1 22-Apr-2012 Bill Wendling <isanbard@gmail.com> Add a flag to the struct type finder to collect only those types which have
names. This saves collecting types we normally don't care about.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@155300 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
a20689fd7e7fa095276491ff238f248339d28800 24-Mar-2012 Bill Wendling <isanbard@gmail.com> It's possible for two types, which are isomorphic, to be added to the
destination module, but one of them isn't used in the destination module. If
another module comes along and the uses the unused type, there could be type
conflicts when the modules are finally linked together. (This happened when
building LLVM.)

The test that was reduced is:

Module A:

%Z = type { %A }
%A = type { %B.1, [7 x x86_fp80] }
%B.1 = type { %C }
%C = type { i8* }

declare void @func_x(%C*, i64, i64)
declare void @func_z(%Z* nocapture)

Module B:

%B = type { %C.1 }
%C.1 = type { i8* }
%A.2 = type { %B.3, [5 x x86_fp80] }
%B.3 = type { %C.1 }

define void @func_z() {
%x = alloca %A.2, align 16
%y = getelementptr inbounds %A.2* %x, i64 0, i32 0, i32 0
call void @func_x(%C.1* %y, i64 37, i64 927) nounwind
ret void
}

declare void @func_x(%C.1*, i64, i64)
declare void @func_y(%B* nocapture)

(Unfortunately, this test doesn't fail under llvm-link, only during an LTO
linking.) The '%C' and '%C.1' clash. The destination module gets the '%C'
declaration. When merging Module B, it looks at the '%C.1' subtype of the '%B'
structure. It adds that in, because that's cool. And when '%B.3' is processed,
it uses the '%C.1'. But the '%B' has used '%C' and we prefer to use '%C'. So the
'@func_x' type is changed to 'void (%C*, i64, i64)', but the type of '%x' in
'@func_z' remains '%A.2'. The GEP resolves to a '%C.1', which conflicts with the
'@func_x' signature.

We can resolve this situation by making sure that the type is used in the
destination before saying that it should be used in the module being merged in.

With this fix, LLVM and Clang both compile under LTO.
<rdar://problem/10913281>


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153351 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
208b6f69441293d27b61b9d16a69c9bba4d097cb 23-Mar-2012 Bill Wendling <isanbard@gmail.com> Ignore the last message.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153315 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
b22a166796afd06c2ccea8838220dbbe3644de81 23-Mar-2012 Bill Wendling <isanbard@gmail.com> Revert patch. It broke the build.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153314 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
12d9a9002f9fba3ea42225b8daf4f9feda52726d 23-Mar-2012 Bill Wendling <isanbard@gmail.com> Dematerialize the source functions after we're done with them. This saves a bit
of memory during LTO.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153313 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
ee5a53d21eec151688376f158d5ae6832bbd1d96 22-Mar-2012 Bill Wendling <isanbard@gmail.com> Some whitespace and comment cleanup.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153278 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
6d6c6d7d2ce42af78ffa4e84a30f14e4404f5985 22-Mar-2012 Bill Wendling <isanbard@gmail.com> Remove unneeded #ifdefs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153277 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
cd7193fbce32e8ed3a63e8b76672cdf9956891ca 22-Mar-2012 Bill Wendling <isanbard@gmail.com> Add a 'dump' method to the type map. Doxygenify some of the comments and add a
few comments where none existed before. Also change a function's name to match
the current coding standard.
No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153276 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
0aaf2f63699f4c99a940abf81c4c9d912fa54356 03-Mar-2012 Duncan Sands <baldrick@free.fr> Include cctype for isdigit. Patch by Stephen Hines.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151973 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
601c094734cc5920a4e937c74447dd6922770a2d 28-Feb-2012 Bill Wendling <isanbard@gmail.com> Oops...Don't commit the other stuff..

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151618 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
cb8a7ed16b905665f001a90ff15a52119aaa2bef 28-Feb-2012 Bill Wendling <isanbard@gmail.com> Modify comment to reflect the importance of this code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151617 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
348e5e763e1297870878c5cb11aadfab2e8e5e7a 28-Feb-2012 Bill Wendling <isanbard@gmail.com> Add back removed code. It still causes LLVM to miscompile. But not having it breaks other things.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151594 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
e9142f035d7452b502b20915b2538b8b50fb9414 27-Feb-2012 Bill Wendling <isanbard@gmail.com> Don't use #if 0. Just remove until I can address this.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151580 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
c68d127b2c5a233c5e3f9dd59ca4ab335419d9dd 27-Feb-2012 Bill Wendling <isanbard@gmail.com> The code that cleans up multiple, isomorphic types has a subtle error that
manifests itself when building LLVM with LTO.
<rdar://problem/10913281>


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151576 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
75b3d6886762bbbc9e1805793222c29cb39fbd2f 14-Feb-2012 Bill Wendling <isanbard@gmail.com> Capitalize messages so that they appear nicely with the linker's error messages.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150466 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
d34cb1e09f5e4b3feb7305346655b83ad2f67773 11-Feb-2012 Bill Wendling <isanbard@gmail.com> [WIP] Initial code for module flags.

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
/external/llvm/lib/Linker/LinkModules.cpp
858143816d43e58b17bfd11cb1b57afbd7f0f893 07-Feb-2012 Craig Topper <craig.topper@gmail.com> Convert assert(0) to llvm_unreachable

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149967 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
a1f00f4d488eb5daff52faaf99c62ee652fd3b85 25-Jan-2012 Chris Lattner <sabre@nondot.org> use Constant::getAggregateElement to simplify a bunch of code.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148934 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
1ee0ecf84a07693c3a517ba030fac8ac1f9f3fbc 24-Jan-2012 Chris Lattner <sabre@nondot.org> add more support for ConstantDataSequential


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148802 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
3ed8815541d2118728a91bbd5bee054fbcfba71f 06-Jan-2012 Rafael Espindola <rafael.espindola@gmail.com> Link symbols with different visibilities according to the rules in the
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
/external/llvm/lib/Linker/LinkModules.cpp
d24397a9319a41e80169f572ad274a711f41d64e 23-Dec-2011 Mon P Wang <wangmp@apple.com> When not destroying the source, the linker is not remapping the types. Added support
to CloneFunctionInto to allow remapping for this case.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147217 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
1a31f3b90c012b067f8509546e1e037051e6482d 21-Dec-2011 Chris Lattner <sabre@nondot.org> Fix a nasty bug in the type remapping stuff that I added that is breaking kc++ on
the build bot in some cases. The basic issue happens when a source module contains
both a "%foo" type and a "%foo.42" type. It will see the later one, check to see if
the destination module contains a "%foo" type, and it will return true... because
both the source and destination modules are in the same LLVMContext. We don't want
to map source types to other source types, so don't do the remapping if the mapped
type came from the source module.

Unfortunately, I've been unable to reduce a decent testcase for this, kc++ is
pretty great that way.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147010 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
ea93373a0a1bf1d087f5414e566384c2af3ebf09 20-Dec-2011 Chris Lattner <sabre@nondot.org> Now that PR11464 is fixed, reapply the patch to fix PR11464,
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
/external/llvm/lib/Linker/LinkModules.cpp
68910509fdd638727ce2f244ab7c0e4346671de1 20-Dec-2011 Chris Lattner <sabre@nondot.org> fix PR11464 by preventing the linker from mapping two different struct types 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
/external/llvm/lib/Linker/LinkModules.cpp
2e6119429fc521cddd7dde4f8f237ab0ec5ceb06 17-Dec-2011 Chad Rosier <mcrosier@apple.com> Revert 146728 as it's causing failures on some of the external bots as well as
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
/external/llvm/lib/Linker/LinkModules.cpp
9646acfccfae3e5dd4fc18bbb14b0a5c9cc9563e 16-Dec-2011 Chris Lattner <sabre@nondot.org> 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@146728 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
9af37a3de8c8688adae383471379f0216287ce28 02-Nov-2011 Tanya Lattner <tonic@nondot.org> Add support to the linker to lazily link in functions. This change only links functions marked with specific linkage (internal, private, linker_private, linker_private_weak, linker_private_weak_def_auto, linkonce, linkonce_odr, and available_externally) if they have uses in the destination module. Instead of automatically linking, these functions are placed onto a worklist to be processed in the final stage of linking. We iterate over the list and if any functions on the list have uses in the destination module, we link them in and repeat the process until no changes in the state (uses) has changed. This means that any functions in the LazilyLink worklist that have a use in the destination module will be linked in and none that don't.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143524 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
8895316d0489e2353c0dce289b49f5cdd41085d7 30-Oct-2011 Peter Collingbourne <peter@pcc.me.uk> Teach ModuleLinker::getLinkageResult about materialisable functions

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143316 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
2b28a74bc69e33eedc60f438e4fe9ef9ae606f3c 15-Oct-2011 Tanya Lattner <tonic@nondot.org> Allow the source module to be materialized during the linking process.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142010 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
f1f1a4f16128ffa2910f0b1d5c7052b3697f9fcd 11-Oct-2011 Tanya Lattner <tonic@nondot.org> Make it possible to use the linker without destroying the source module. This is so the source module can be linked to multiple other destination modules. For all that used LinkModules() before, they will continue to destroy the source module as before.

This line, and those below, will be ignored--

M include/llvm/Linker.h
M tools/bugpoint/Miscompilation.cpp
M tools/bugpoint/BugDriver.cpp
M tools/llvm-link/llvm-link.cpp
M lib/Linker/LinkModules.cpp


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141606 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
1bcbf8582e94eee6f151e5e2db2d04f417abf5f7 12-Aug-2011 Chris Lattner <sabre@nondot.org> switch to the new struct api.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137482 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
211da8f7a96e26cc8d53a0c2ea34f6b791513021 04-Aug-2011 Devang Patel <dpatel@apple.com> Linke NamedMDNodes after linking global values as comment suggests.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136909 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
39b5abf507b43da6b92f68b86406e0015ead18e9 18-Jul-2011 Frits van Bommel <fvbommel@gmail.com> Migrate LLVM and Clang to use the new makeArrayRef(...) functions where previously explicit non-default constructors were used.
Mostly mechanical with some manual reformatting.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135390 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
2959ebd14d1f98095678ae6bd8bb52ee456313cd 15-Jul-2011 Devang Patel <dpatel@apple.com> Link NamedMDNode before linking function bodies.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135204 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
f84c59d1100af416a70e475eb25741e27f3bb832 14-Jul-2011 Chris Lattner <sabre@nondot.org> simplify this logic now that GlobalAlias::isDeclaration is fixed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135183 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
1afcace3a3a138b1b18e5c6270caa8dae2261ae2 09-Jul-2011 Chris Lattner <sabre@nondot.org> Land the long talked about "type system rewrite" patch. This
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
/external/llvm/lib/Linker/LinkModules.cpp
87fa8d12b49621a28ca0bda7a480531608df80c8 30-Mar-2011 Bill Wendling <isanbard@gmail.com> Set the unnamed_addr only when we're creating a new GV in the dest module.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128507 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
5f49c296127d41636a3b0466d64684c7c46ef45d 30-Mar-2011 Bill Wendling <isanbard@gmail.com> Revert r128501. It caused test failures.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128506 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
75c7563f834b06cfc71ef53bd4c37e58d2d96ff6 30-Mar-2011 Bill Wendling <isanbard@gmail.com> We need to copy over the unnamed_addr attribute.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128501 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
4e93885bab8c3738fdad3286e99dc147157218e8 01-Feb-2011 Rafael Espindola <rafael.espindola@gmail.com> Correctly merge available_externally and regular definitions when they have
different visibilities.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124650 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
ba7c38c36adb65d66c129270b2813fd2167488ed 15-Jan-2011 Rafael Espindola <rafael.espindola@gmail.com> Allow unnamed_addr on declarations.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123529 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
c2a94da3134fcd5745f1b852af6b4ade7b57b4d3 13-Jan-2011 Rafael Espindola <rafael.espindola@gmail.com> Keep unnamed_addr when linking.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123364 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
b5fa5fcecc97168a72c9533c84cf297c018b957c 08-Jan-2011 Chris Lattner <sabre@nondot.org> Revamp the ValueMapper interfaces in a couple ways:

1. Take a flags argument instead of a bool. This makes
it more clear to the reader what it is used for.
2. Add a flag that says that "remapping a value not in the
map is ok".
3. Reimplement MapValue to share a bunch of code and be a lot
more efficient. For lookup failures, don't drop null values
into the map.
4. Using the new flag a bunch of code can vaporize in LinkModules
and LoopUnswitch, kill it.

No functionality change.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123058 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
a797ee0210902669833720f9df7c3be5e58c1401 30-Dec-2010 Chris Lattner <sabre@nondot.org> include the module identifier when emitting this warning, PR8865.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122637 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
c7bad7760609845377d7612a41df5529e01a39b3 30-Dec-2010 Chris Lattner <sabre@nondot.org> print the right string, thanks for Frits for noticing.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122636 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
e0f6db369d09e15f752618b2346642ee65bf7b3d 29-Dec-2010 Chris Lattner <sabre@nondot.org> improve warning message to at least say what the triples are.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122632 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
79e86252208848020e0b13d77b8c6918e92b8328 18-Dec-2010 Michael J. Spencer <bigcheesegs@gmail.com> Fix whitespace.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122158 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
738550910156b5cefdc0c12923ec8cc6982fb26f 18-Dec-2010 Michael J. Spencer <bigcheesegs@gmail.com> Support/PathV1: Deprecate get{Basename,Dirname,Suffix}.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122157 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
fffa8635361639acadb78089c5b9b445c0aa1d30 18-Dec-2010 Owen Anderson <resistor@mac.com> Revert r122143 through r122140, which collectively broke the LLVMC tests on
the buildbots.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122149 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
1d6e7d2e42e5e445cd6fcfa669388cdd03b3ea15 18-Dec-2010 Michael J. Spencer <bigcheesegs@gmail.com> Fix whitespace.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122142 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
b9c767cce502f016a5bdb07884625a3fffbe048c 18-Dec-2010 Michael J. Spencer <bigcheesegs@gmail.com> Support/PathV1: Deprecate get{Basename,Dirname,Suffix}.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122141 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
1f6efa3996dd1929fbc129203ce5009b620e6969 29-Nov-2010 Michael J. Spencer <bigcheesegs@gmail.com> Merge System into Support.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120298 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
19785995f60c6980677888985884d65dc8975b44 19-Oct-2010 Rafael Espindola <rafael.espindola@gmail.com> Fix PR8300 by remembering to keep the bitcast in all cases.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116788 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
933f9bdb00a8fe48833c4ea3ded20a6a90c405b0 06-Oct-2010 Bill Wendling <isanbard@gmail.com> Revert "RequiresUnique" patch. This should be handled at a lower level.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115827 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
c7a012e581ad11b2464afa71f43e32fc79f143c9 06-Oct-2010 Bill Wendling <isanbard@gmail.com> Change RequiresMerge to RequiresUnique. It's a better description of what this
fix is trying to accomplish.

This code could still use some polishing.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115759 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
7f5124829ffcf75f598b024ec40cc83753eb72d4 06-Oct-2010 Bill Wendling <isanbard@gmail.com> If the destination module all ready has a copy of the global coming from the
source module *and* it must be merged (instead of simply replaced or appended
to), then merge instead of replacing or adding another global.

The ObjC __image_info section was being appended to because of this
failure. This caused a crash because the linker expects the image info section
to be a specific size.

<rdar://problem/8198537>


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115753 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
0b5b18340b9c57e8c97172b3190bb97371b72e08 01-Sep-2010 Chris Lattner <sabre@nondot.org> dead code patrol


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112713 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
6cb8c23db1c3becdce6dfbf1b7f1677faca4251e 26-Aug-2010 Dan Gohman <gohman@apple.com> Reapply r112091 and r111922, support for metadata linking, with a
fix: add a flag to MapValue and friends which indicates whether
any module-level mappings are being made. In the common case of
inlining, no module-level mappings are needed, so MapValue doesn't
need to examine non-function-local metadata, which can be very
expensive in the case of a large module with really deep metadata
(e.g. a large C++ program compiled with -g).

This flag is a little awkward; perhaps eventually it can be moved
into the ClonedCodeInfo class.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112190 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
fd406f1ee2d94bafcb4943e4b21c2f4ea4bd8f3a 26-Aug-2010 Daniel Dunbar <daniel@zuster.org> Revert r112091, "Remap metadata attached to instructions when remapping
individual ...", which depends on r111922, which I am reverting.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112157 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
ce934260dc4ce12bd59f15aaa5ef28520214ad4f 25-Aug-2010 Dan Gohman <gohman@apple.com> Remap metadata attached to instructions when remapping individual
instructions, not when remapping modules.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112091 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
4e34d502727df36cc2caa59307953444b1ee9914 24-Aug-2010 Bill Wendling <isanbard@gmail.com> - Add the LinkerPrivateWeakDefAutoLinkage to the Ada bindings.
- Support the LinkerWeak*Linkage types in llvm-nm and in LinkModules.cpp.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111952 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
e422d1b16238ad4d9d7ef3b074715e795ab3ddc0 24-Aug-2010 Dan Gohman <gohman@apple.com> Link NamedMDNodes after linking GlobalValues, so that MDNodes
which reference GlobalValues are properly remapped.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111949 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
e5835fbe7fb3d87b8cd110b24f0f9772384a5212 24-Aug-2010 Dan Gohman <gohman@apple.com> When linking NamedMDNodes, remap their operands.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111948 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
05ea54e8869a81b8dd846397175f218f97968907 24-Aug-2010 Dan Gohman <gohman@apple.com> Use MapValue in the Linker instead of having a private function
which does the same thing. This eliminates redundant code and
handles MDNodes better. MDNode linking still doesn't fully
work yet though.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111941 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
c47a474802172608f0ddb68948e766155b5e40d4 24-Aug-2010 Dan Gohman <gohman@apple.com> Don't cast away qualifiers with C-style casts.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111933 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
8c8b9ee8c8646aa1a79c782d4da9abdf3eb4eefe 15-Aug-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Revert r111082. No warnings for this common pattern.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111102 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
7268d97ae6c1680be96e5758c33cdd46efb6ce54 14-Aug-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Add ATTRIBUTE_UNUSED to methods that are not supposed to be used.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111082 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
17aa92c92a925b4a674440c7ef088c223990e854 22-Jul-2010 Dan Gohman <gohman@apple.com> Make NamedMDNode not be a subclass of Value, and simplify the interface
for creating and populating NamedMDNodes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109061 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
07d317711781d8c9268f7d6afcf1ba7eadf1d127 30-Jun-2010 Bill Wendling <isanbard@gmail.com> Revert r107205 and r107207.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107215 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
207855cff9b4811004b9720f28a5bd0adf3784b7 29-Jun-2010 Bill Wendling <isanbard@gmail.com> Introducing the "linker_weak" linkage type. This will be used for Objective-C
metadata types which should be marked as "weak", but which the linker will
remove upon final linkage. For example, the "objc_msgSend_fixup_alloc" symbol is
defined like this:

.globl l_objc_msgSend_fixup_alloc
.weak_definition l_objc_msgSend_fixup_alloc
.section __DATA, __objc_msgrefs, coalesced
.align 3
l_objc_msgSend_fixup_alloc:
.quad _objc_msgSend_fixup
.quad L_OBJC_METH_VAR_NAME_1

This is different from the "linker_private" linkage type, because it can't have
the metadata defined with ".weak_definition".


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107205 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
47c5188789bc40671504ed1fa3a44765cefba44f 16-Feb-2010 Duncan Sands <baldrick@free.fr> Introduce isOpaqueTy and use it rather than isa<OpaqueType>. Also, move some
methods to try to have the type predicates be more logically positioned.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96349 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
c8d7b85ba133f6e590d1c3ac78d47c88914aedea 06-Feb-2010 Victor Hernandez <vhernandez@apple.com> Linker should not remap null operands of metadata

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95468 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
7bf5cf401f27ac7cafe3e2c097cf14b7bb30a653 27-Jan-2010 Victor Hernandez <vhernandez@apple.com> Need to recurse for all operands of function-local metadata; and handle Instructions (which map to themselves)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94691 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
0a65a1441731c5fcf08647e95c9802844da68514 27-Jan-2010 Chris Lattner <sabre@nondot.org> merge two ifs


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94650 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
2c9ad13b14de9fcc98f868d301950f0f386f2545 27-Jan-2010 Victor Hernandez <vhernandez@apple.com> Linker needs to do deep-copy of function-local metadata to update references to function arguments

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94632 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
bc5201f8371f9041e79efcca3b158335da5c2604 22-Jan-2010 Devang Patel <dpatel@apple.com> Remove MetadataBase class because it is not adding significant value.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94243 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
3472246edee4e120e3eb1ec4ad443ba884bc7ac7 09-Jan-2010 David Chisnall <csdavec@swan.ac.uk> Fixed linking of modules containing aliases to constant bitcasts. Existing behaviour first tried to replace the aliases with the global that they aliased (rather than the bitcast), causing a crash on an assert because the types didn't match. When this was fixed, it then did the same thing creating the new alias (creating an alias with a different type to its aliasee).

Linking modules containing aliases to GEPs is still not quite right. GEPs that are equivalent to bitcasts will be replaced by bitcasts, GEPs that are not will just break. Aliases to GEPs that are not equivalent to bitcasts are horribly broken anyway (it might be worth adding an assert when creating the alias to prevent these being created; they just cause problems later).



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93052 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
0fbf0e3d5e8f45925fc879b705ae0320f8bc76f8 05-Jan-2010 David Greene <greened@obbligato.org> Change errs() to dbgs().

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92628 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
5d0cacdbb6577f2449986f345858db17dc1bcf59 31-Dec-2009 Chris Lattner <sabre@nondot.org> rename "elements" of metadata to "operands". "Elements" are
things that occur in types. "operands" are things that occur
in values.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92322 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
e90c545aeb53bacdad1206bbceb72087c78a2283 28-Dec-2009 Bill Wendling <isanbard@gmail.com> Remove dead store.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92192 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
2a749d36475bda8964e996725ea101aec3ee15cf 01-Nov-2009 Chris Lattner <sabre@nondot.org> implement linker support for BlockAddress.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85700 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
be6d1fd5f42b6039d2af664dbd0ab95cfbd08452 13-Sep-2009 Dan Gohman <gohman@apple.com> Remove unnecessary #include.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81636 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
faf8fa566493a3aefb18f784cf706aae6a1e569f 03-Sep-2009 Devang Patel <dpatel@apple.com> There is not any need to copy metadata while merging modules.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80941 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
74382b7c699120fbec5cb5603c9cf4212eb37f06 24-Aug-2009 Chris Lattner <sabre@nondot.org> Prune #includes from llvm/Linker.h and llvm/System/Path.h,
forcing them down into various .cpp files.

This change also:
1. Renames TimeValue::toString() and Path::toString() to ::str()
for similarity with the STL.
2. Removes all stream insertion support for sys::Path, forcing
clients to call .str().
3. Removes a use of Config/alloca.h from bugpoint, using smallvector
instead.
4. Weans llvm-db off <iostream>

sys::Path really needs to be gutted, but I don't have the desire to
do it at this point.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79869 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
bdff548e4dd577a72094d57b282de4e765643b96 23-Aug-2009 Chris Lattner <sabre@nondot.org> eliminate the "Value" printing methods that print to a std::ostream.
This required converting a bunch of stuff off DOUT and other cleanups.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79819 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
ab67e705f59d567afded845465f358b8a66ab62e 11-Aug-2009 Devang Patel <dpatel@apple.com> Link NamedMDNodes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78696 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
ae709eaeb12e4a293e812c61514a9ebd9e24fe14 11-Aug-2009 Devang Patel <dpatel@apple.com> Link metadata.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78652 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
a7235ea7245028a0723e8ab7fd011386b3900777 31-Jul-2009 Owen Anderson <resistor@mac.com> Move a few more APIs back to 2.5 forms. The only remaining ones left to change back are
metadata related, which I'm waiting on to avoid conflicting with Devang.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77721 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
debcb01b0f0a15f568ca69e8f288fade4bfc7297 30-Jul-2009 Owen Anderson <resistor@mac.com> Move types back to the 2.5 API.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77516 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
6c1e983a1756e914b328644e6cab7b4a39eb7853 29-Jul-2009 Benjamin Kramer <benny.kra@googlemail.com> Remove now unused Context variables.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77495 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
baf3c404409d5e47b13984a7f95bfbd6d1f2e79e 29-Jul-2009 Owen Anderson <resistor@mac.com> Move ConstantExpr to 2.5 API.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77494 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
af7ec975870f92245f1f1484ac80a1e2db6a0afa 28-Jul-2009 Owen Anderson <resistor@mac.com> Return ConstantVector to 2.5 API.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77366 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
1fd7096407d5e598ed3366a1141548e71273f1c5 28-Jul-2009 Owen Anderson <resistor@mac.com> Change ConstantArray to 2.5 API.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77347 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
8fa3338ed2400c1352b137613d2c2c70d1ead695 28-Jul-2009 Owen Anderson <resistor@mac.com> Move ConstantStruct back to 2.5 API.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77266 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
03d7651c3652e1f0cc86e79b26585d86818da9cf 26-Jul-2009 Daniel Dunbar <daniel@zuster.org> Remove Value::{isName, getNameRef}.

Also, change MDString to use a StringRef.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77098 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
6e0d1cb30957a636c53158d3089e6fb88348a57a 25-Jul-2009 Daniel Dunbar <daniel@zuster.org> Initial update to VMCore to use Twines for string arguments.
- The only meat here is in Value.{h,cpp} the rest is essential 'const
std::string &' -> 'const Twine &'.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77048 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
bc8d813f715e47afd27b73b0b7abd00978e0ba51 23-Jul-2009 Daniel Dunbar <daniel@zuster.org> Switch ValueSymbolTable to StringRef based API.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76894 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
e922c0201916e0b980ab3cfe91e1413e68d55647 22-Jul-2009 Owen Anderson <resistor@mac.com> Get rid of the Pass+Context magic.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76702 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
3d10a5a75794356a0a568ce283713adc3a963200 20-Jul-2009 Bill Wendling <isanbard@gmail.com> Add plumbing for the `linker_private' linkage type. This type is meant for
"private" symbols which the assember shouldn't strip, but which the linker may
remove after evaluation. This is mostly useful for Objective-C metadata.

This is plumbing, so we don't have a use of it yet. More to come, etc.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76385 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
c23197a26f34f559ea9797de51e187087c039c42 14-Jul-2009 Torok Edwin <edwintorok@gmail.com> llvm_unreachable->llvm_unreachable(0), LLVM_UNREACHABLE->llvm_unreachable.
This adds location info for all llvm_unreachable calls (which is a macro now) in
!NDEBUG builds.
In NDEBUG builds location info and the message is off (it only prints
"UREACHABLE executed").


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75640 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
c25e7581b9b8088910da31702d4ca21c4734c6d7 11-Jul-2009 Torok Edwin <edwintorok@gmail.com> assert(0) -> LLVM_UNREACHABLE.
Make llvm_unreachable take an optional string, thus moving the cerr<< out of
line.
LLVM_UNREACHABLE is now a simple wrapper that makes the message go away for
NDEBUG builds.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75379 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
e9b11b431308f4766b73cda93e38ec930c912122 08-Jul-2009 Owen Anderson <resistor@mac.com> Switch GlobalVariable ctors to a sane API, where *either* a context or a module is required.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75025 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
3d29df3e8a203b167d8071ea6f805b21db18a5af 08-Jul-2009 Owen Anderson <resistor@mac.com> Push LLVMContext through GlobalVariables and IRBuilder.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74985 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
c9ab7bf98f6a0261220e4b2380db2df8ee29829b 07-Jul-2009 Owen Anderson <resistor@mac.com> LLVM Context-ification.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74948 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
266c7bbbbcc4b326dea82e577de1a415d6acc23e 13-Apr-2009 Chris Lattner <sabre@nondot.org> Add a new "available_externally" linkage type. This is intended
to support C99 inline, GNU extern inline, etc. Related bugzilla's
include PR3517, PR3100, & PR2933. Nothing uses this yet, but it
appears to work.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68940 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
a05ef5e107943478ad02bc0cd5170a3894076bc4 08-Mar-2009 Duncan Sands <baldrick@free.fr> Apply ODR linkage changes accidentally dropped during
final cleaning. This fixes a bunch of testsuite failures.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66380 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
667d4b8de6dea70195ff12ef39a4deebffa2f5c7 07-Mar-2009 Duncan Sands <baldrick@free.fr> Introduce new linkage types linkonce_odr, weak_odr, common_odr
and extern_weak_odr. These are the same as the non-odr versions,
except that they indicate that the global will only be overridden
by an *equivalent* global. In C, a function with weak linkage can
be overridden by a function which behaves completely differently.
This means that IP passes have to skip weak functions, since any
deductions made from the function definition might be wrong, since
the definition could be replaced by something completely different
at link time. This is not allowed in C++, thanks to the ODR
(One-Definition-Rule): if a function is replaced by another at
link-time, then the new function must be the same as the original
function. If a language knows that a function or other global can
only be overridden by an equivalent global, it can give it the
weak_odr linkage type, and the optimizers will understand that it
is alright to make deductions based on the function body. The
code generators on the other hand map weak and weak_odr linkage
to the same thing.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66339 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
c834bbf55832c45f90b1163f920472fefbf77bc1 03-Mar-2009 Mikhail Glushenkov <foldr@codedgers.com> Oops.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65942 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
eba2cb0d5aef5a8229facae5624c65d9fd65e9d1 03-Mar-2009 Mikhail Glushenkov <foldr@codedgers.com> 80-column violation + trailing whitespace.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65936 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
bb46f52027416598a662dc1c58f48d9d56b1a65b 15-Jan-2009 Rafael Espindola <rafael.espindola@gmail.com> Add the private linkage.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62279 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
d13726f1e91218bc3f7103adf6cd98676bc477e2 15-Oct-2008 Anton Korobeynikov <asl@math.spbu.ru> Also properly handle linking of strong alias and weak global

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57595 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
e655e3703280d001375ffa44093f8f4ec879c77b 15-Oct-2008 Anton Korobeynikov <asl@math.spbu.ru> Properly handle linking of strong alias with weak function, this fixes PR2883

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57594 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
5df3186f598163258fabf3448d9372843804d1ab 29-Sep-2008 Duncan Sands <baldrick@free.fr> Rename isWeakForLinker to mayBeOverridden. Use it
instead of hasWeakLinkage in a bunch of optimization
passes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56782 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
19e861a4ffb896f16a691d5ac869e894df3cd464 09-Sep-2008 Anton Korobeynikov <asl@math.spbu.ru> Make safer variant of alias resolution routine to be default

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56005 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
832b2a9cd8870211bf2d347d7b435beacbb06c8d 09-Sep-2008 Anton Korobeynikov <asl@math.spbu.ru> Fix incorrect linker behaviour: we shouldn't resolve weak aliases.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55997 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
6157e383c4a15ffb6e7f27cdb153daa9caa15ca5 14-Jul-2008 Chris Lattner <sabre@nondot.org> Reimplement LinkFunctionProtos in terms of GetLinkageResult. This fixes
the second half of link-global-to-func.ll and causes some minor changes in
messages.

There are two TODOs here. First, this causes a regression in
2008-07-06-AliasWeakDest.ll, which is now failing (so I xfailed it). Anton,
I would really appreciate it if you could take a look at this. It should be
a matter of adding proper alias support to GetLinkageResult, and was probably
already a latent bug that would manifest with globals.

The second todo is to reimplement LinkAlias in the same pattern as
function and global linking. This should be pretty straight-forward for
someone who knows aliases, but isn't a requirement for correctness.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53548 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
ae1132d2b8ae07afd2fe9a7cb434d849f884bfa0 14-Jul-2008 Chris Lattner <sabre@nondot.org> don't do any linkage, not even type resolution, of symbols that have
internal linkage.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53547 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
d1ec48c641f76d4c0e5b7cb357a1333d4fb75c4a 14-Jul-2008 Chris Lattner <sabre@nondot.org> implement linking of globals to functions, in one direction
(replacing a function with a global). This is needed when building
llvm itself with LTO on darwin, because of the EXPLICIT_SYMBOL hack
in lib/system/DynamicLibrary.cpp.

Implementation of linking the other way will need to wait for a
cleanup of LinkFunctionProtos.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53546 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
0bb8757997392ee18ca9de0f1fab29463f8e7aeb 14-Jul-2008 Chris Lattner <sabre@nondot.org> wrap long lines, remove some code from a non-assert build.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53545 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
5ed2ba26680f06846e7602ce65432b0a723b1273 10-Jul-2008 Chris Lattner <sabre@nondot.org> The source and dest of an alias are *not* required to have the same type,
though that would be nice and make sense :). Patch by Nathan Keynes!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53387 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
6b345ee9b2833cf1b2f79dc16d06d4060bec36ef 07-Jul-2008 Dan Gohman <gohman@apple.com> Make DenseMap's insert return a pair, to more closely resemble std::map.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53177 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
80585f1daac3570f19cd255c5006dfcf2ff65a89 06-Jul-2008 Anton Korobeynikov <asl@math.spbu.ru> Add convenient helper for checking whether global is weak in linker sense
having weak or linkonce or common or extweak LLVM linkage.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53158 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
f88bc65932e5cf41ba6ca706cd1b1b1f65300248 06-Jul-2008 Anton Korobeynikov <asl@math.spbu.ru> Override weak stuff during linking of aliases. This fixes PR2463.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53156 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
194c2cef8a0036dd4e6295d048f37d6130f92389 06-Jul-2008 Anton Korobeynikov <asl@math.spbu.ru> Properly link alias and function decls. This fixes PR2146

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53154 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
a534b0f7bf0248bf90afe97110a34777e972f325 27-Jun-2008 Chris Lattner <sabre@nondot.org> when linking globals, make sure to preserve the address space of the global.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52810 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
ec91ccba3ca92d5e1f19fb0cb6e57a7d4a3f3195 20-Jun-2008 Chris Lattner <sabre@nondot.org> Fix an error handling redefinition of linkonce functions where the
types differ. Patch by Nathan Keynes!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52527 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
fc196f9ee909ac35837f6f771a42aa0dec817584 17-Jun-2008 Chris Lattner <sabre@nondot.org> Add a missing ~ (dtor became ctor) which caused crashes on a bunch of stuff.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52374 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
a4477f9b31ce0b6fadc5365ff9355679c1ecb954 16-Jun-2008 Chris Lattner <sabre@nondot.org> stop making PATypeHolder's so crazily.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52364 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
62a81a1eba019ab570b002f8e1686494139785a1 16-Jun-2008 Chris Lattner <sabre@nondot.org> use a real associative container for type association instead of using
a vector with a linear search. This speeds up the linking testcase
in PR1860 from 0.965s to 0.385s on my system.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52357 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
56539659eb1b192d493aa333b60213889129b9f1 16-Jun-2008 Chris Lattner <sabre@nondot.org> bail out sooner if we have two concrete but different types.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52351 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
9ddf2c898f5227ca137aef7abc3051e16bd60025 16-Jun-2008 Chris Lattner <sabre@nondot.org> simplify some code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52350 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
849dcd928a58290447a710b856bdd487aac44d24 16-Jun-2008 Chris Lattner <sabre@nondot.org> Apply a patch from Nathan Keynes, which speeds up llvm-link on
the testcases in PR1860 from taking more than 1 hour (when I killed it)
to taking 1s.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52347 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
f6f4f7a149e2864cc0441afcbed5fd99ff4b9587 16-Jun-2008 Chris Lattner <sabre@nondot.org> handle vectors. Any integers that got here would necessarily be different already.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52341 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
bc1c82a0f73eda86cf24416cebc83b4690fcd76a 16-Jun-2008 Chris Lattner <sabre@nondot.org> Simplify ResolveTypes by pulling the null case out into the one
client that cares and simplifying its control flow.

Remove the DestST argument to ResolveTypes and RecursiveResolveTypes*
which are dead now.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52340 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
371ca83d8b7875d30743d9e72fd16a85baacbe63 16-Jun-2008 Chris Lattner <sabre@nondot.org> simplify RecursiveResolveTypes and ResolveTypes by pulling the naming out of
ResolveTypes into the one place that needs it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52338 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
822143e6f7271c6546434d2d0b3da7a29711020d 09-Jun-2008 Chris Lattner <sabre@nondot.org> use 'continue' to make the function linker simpler. When linking a strong
function into a weak function, zap the weak function body so that the
strong one overrides it. This fixes PR2410


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52135 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
824684982968244050e56357e736b9940c23e77d 09-Jun-2008 Chris Lattner <sabre@nondot.org> minor changes to short circuit the 'no linkage' case earlier for
function bodies. We now don't try to unify types or handling type
mismatches if when linking an internal foo to an external foo.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52134 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
bc3d1c7e4c290a35df801000222b8f4b2d51ef20 09-Jun-2008 Chris Lattner <sabre@nondot.org> simplify function visibility handling.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52133 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
28c3cff8250b3fe2adc6479306fe7dbdb48a1bdb 26-May-2008 Duncan Sands <baldrick@free.fr> Factor code to copy global value attributes like
the section or the visibility from one global
value to another: copyAttributesFrom. This is
particularly useful for duplicating functions:
previously this was done by explicitly copying
each attribute in turn at each place where a
new function was created out of an old one, with
the result that obscure attributes were regularly
forgotten (like the collector or the section).
Hopefully now everything is uniform and nothing
is forgotten.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51567 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
b1dbcd886a4b5597a839f299054b78b33fb2d6df 15-May-2008 Gabor Greif <ggreif@gmail.com> Fix a bunch of 80col violations that arose from the Create API change. Tweak makefile targets to find these better.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51143 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
aafce77b17d340aace52bcd49d1944109d82f14a 14-May-2008 Dale Johannesen <dalej@apple.com> Add CommonLinkage; currently tentative definitions
are represented as "weak", but there are subtle differences
in some cases on Darwin, so we need both. The intent
is that "common" will behave identically to "weak" unless
somebody changes their target to do something else.
No functional change as yet.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51118 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
caa8ae8125124822b01ac21a8de186c13fcdd8f3 10-May-2008 Anton Korobeynikov <asl@math.spbu.ru> Fix linking of internal aliases


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50950 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
0b12ecf6ff6b5d3a144178257b6206f0c4788792 08-May-2008 Anton Korobeynikov <asl@math.spbu.ru> Turn StripPointerCast() into a method


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50836 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
149a3153694f8b75f8f2f1754575e6a52b45214a 07-May-2008 Anton Korobeynikov <asl@math.spbu.ru> If weak GlobalVariable was bitcast'ed to different type during linking
we will need to strip all casts for intializer lookup.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50776 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
6bc41e8a74d1756da0003641bfebd02a3d6d9586 14-Apr-2008 Owen Anderson <resistor@mac.com> Revert r49614. As Dan pointed out, some of these aren't correct.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49657 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
386ea355e730a1e92acf84e7a3f2ad95c3d6165b 13-Apr-2008 Owen Anderson <resistor@mac.com> Replace calls of the form V1->setName(V2->getName()) with V1->takeName(V2),
which is significantly more efficient.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49614 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
051a950000e21935165db56695e35bade668193b 06-Apr-2008 Gabor Greif <ggreif@gmail.com> API changes for class Use size reduction, wave 1.
Specifically, introduction of XXX::Create methods
for Users that have a potentially variable number of
Uses.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49277 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
5241957b1f6876452705f94e0ed60dd2c33a5c84 11-Mar-2008 Anton Korobeynikov <asl@math.spbu.ru> Ultimately resolve aliases during linking, if possible


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48259 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
ed61c0bc76a7b9001d7639a908c955d0fae35bac 10-Mar-2008 Anton Korobeynikov <asl@math.spbu.ru> Add sanity checks


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48184 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
b8cdaf7099898d7c0eef4769bf6a89f39e7decc2 10-Mar-2008 Anton Korobeynikov <asl@math.spbu.ru> Typo: 'function' => 'alias'


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48183 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
817bf2aeb22db13d03beb15e9bf17c425d0c694d 10-Mar-2008 Anton Korobeynikov <asl@math.spbu.ru> Syntactic sugar'ify stuff :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48182 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
aeb09967fdb2ff074c91ce8039ebd1917a2f6060 10-Mar-2008 Anton Korobeynikov <asl@math.spbu.ru> Always run 'make check' :) Fix fallout from prev. commit: query for possible
alias destination only if we don't have anything to link to


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48181 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
1438b9dd82887b8faa2c4670dca45965609a43c6 10-Mar-2008 Anton Korobeynikov <asl@math.spbu.ru> Make error messages to have common style


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48180 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
01f69399352380532d480f6749daed660f50b15c 10-Mar-2008 Anton Korobeynikov <asl@math.spbu.ru> Properly link globals with aliases


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48179 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
968e39a5aba998a126278425da8287aae358e7a7 10-Mar-2008 Anton Korobeynikov <asl@math.spbu.ru> Remove the LinkGlobal weirderness in common linking phase.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48177 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
2b48ef0450944c2c46633aec9baf6be835a3b503 10-Mar-2008 Anton Korobeynikov <asl@math.spbu.ru> Typo


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48176 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
58d5e051574339106ce4139697ebadd21e34dbc0 09-Mar-2008 Ted Kremenek <kremenek@apple.com> Fix some compilation errors on msvc:
- "Redefinition of I" (iterator masks previous definition)
- include missing header file

Patch by Argiris Kirtzidis!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48115 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
75c7915c3a24f8063c274ccffe2dc9b7bc8bce1f 07-Mar-2008 Anton Korobeynikov <asl@math.spbu.ru> Clarify some important bits


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48010 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
e20c814518e3322f5bf5f83e9ca42bd6bdd40745 07-Mar-2008 Anton Korobeynikov <asl@math.spbu.ru> Small cleanup: propagate thread-localness via generic routine.
No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48009 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
9f2ee703663d8ca7d91cfdaf773fc70273e9e482 06-Mar-2008 Anton Korobeynikov <asl@math.spbu.ru> Missed patch from my last commit


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47977 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
3db9191baf5f5229a2f4d204c6332ba27fff81d0 06-Mar-2008 Anton Korobeynikov <asl@math.spbu.ru> Resolve aliases to aliasees, where possible


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47975 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
b5a4bd86df527c7d164197906861d2ca6f48678d 06-Mar-2008 Anton Korobeynikov <asl@math.spbu.ru> Handle functions as targets during linking of aliases as well


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47974 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
58887bc59316bcaf0c0675a45ddecd6994f3fbc6 05-Mar-2008 Anton Korobeynikov <asl@math.spbu.ru> Try hard to link aliases. Checks can be too strict by now.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47968 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
4fb2873bb46330da18f413cec661ce2fd0f9f37c 05-Mar-2008 Anton Korobeynikov <asl@math.spbu.ru> Remember the source->dest mapping when copying aliases. This fixes PR2054


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47945 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
1c01a72d4d29897763a85a9dd56a3457607ff2ef 05-Mar-2008 Anton Korobeynikov <asl@math.spbu.ru> Clarify the state-of-the-art


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47944 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
a27694d7aac1bfcec2b776df460719b4a165a79a 20-Feb-2008 Anton Korobeynikov <asl@math.spbu.ru> And final pack of warnings silencing


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47372 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
f27dfcb210fec571d79bc881f5463e0b405707c0 19-Feb-2008 Chris Lattner <sabre@nondot.org> random cleanups.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47334 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
4ee451de366474b9c228b4e5fa573795a715216d 29-Dec-2007 Chris Lattner <sabre@nondot.org> Remove attribution from file headers, per discussion on llvmdev.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45418 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
650d5053bfb388bc81aecd202f16d2e128e1f23e 28-Dec-2007 Anton Korobeynikov <asl@math.spbu.ru> Ignore functions with internal linkages during linking. This snipped mimics the
behaviour of LinkGlobals() function.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45375 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
194c90ed2a8e74b5a1c5184835f84c572d524dad 25-Dec-2007 Gordon Henriksen <gordonhenriksen@mac.com> Fixing several transforms which would drop the collector attribute
when copying functions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45356 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
dc024674ff96820d6020757b48d47f46d4c07db2 27-Nov-2007 Duncan Sands <baldrick@free.fr> Fix PR1146: parameter attributes are longer part of
the function type, instead they belong to functions
and function calls. This is an updated and slightly
corrected version of Reid Spencer's original patch.
The only known problem is that auto-upgrading of
bitcode files doesn't seem to work properly (see
test/Bitcode/AutoUpgradeIntrinsics.ll). Hopefully
a bitcode guru (who might that be? :) ) will fix it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44359 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
c318329a1098a19137398af4d880f4d8cdd9cd8d 08-Oct-2007 Dan Gohman <gohman@apple.com> Use correct parentheses with the '&& "..."' idiom in an assert.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42750 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
97f8b0900abddfa72fd59e777399280adb4ca0a6 20-Aug-2007 Chris Lattner <sabre@nondot.org> Fix PR1611 - Visibility should be ignored for a declaration
when a definition's visibility is different. Likewise, the
visibility of two declarations mismatching is not an error.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41174 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
00d8a84b4432bedc3050f012454cbf6ef1b05461 28-Jun-2007 Lauro Ramos Venancio <lauro.venancio@gmail.com> Fix a bug in my previous patch.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37778 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
31ed0fb804dd86fb15093e114701932119914400 28-Jun-2007 Lauro Ramos Venancio <lauro.venancio@gmail.com> When linking two modules, we should copy the alias.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37776 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
9613e871d26f123789d98c61879b4dbe944a6d31 07-Jun-2007 Lauro Ramos Venancio <lauro.venancio@gmail.com> Propagate alignment, section name and visibility when linking "appending
global values".
Fix noinline linkage.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37482 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
9cd3ccf5065a8a139e458d016c88a8512471598b 29-Apr-2007 Anton Korobeynikov <asl@math.spbu.ru> Implement visibility checking during linking. Also implement protected
visibility support for bitcode.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36577 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
c763552299165b88d34a7d4f2d76ff413cbc7f67 12-Apr-2007 Lauro Ramos Venancio <lauro.venancio@gmail.com> Implement the "thread_local" keyword.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35950 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
9d6565a5b1fbc4286d6ee638d8f47a3171a9ed7e 15-Feb-2007 Reid Spencer <rspencer@reidspencer.com> For PR1195:
Rename PackedType -> VectorType, ConstantPacked -> ConstantVector, and
PackedTyID -> VectorTyID. No functional changes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34293 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
33f294930e0affa51c3818405741abd80cc90316 11-Feb-2007 Chris Lattner <sabre@nondot.org> simplify this code by using value::takename


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34172 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
ef9b9a793949469cdaa4ab6d0173136229dcab7b 05-Feb-2007 Reid Spencer <rspencer@reidspencer.com> For PR411:
This patch replaces the SymbolTable class with ValueSymbolTable which does
not support types planes. This means that all symbol names in LLVM must now
be unique. The patch addresses the necessary changes to deal with this and
removes code no longer needed as a result. This completes the bulk of the
changes for this PR. Some cleanup patches will follow.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33918 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
619f024cc315b9edcc6bc71ebea68fd44d85aeaf 04-Feb-2007 Reid Spencer <rspencer@reidspencer.com> Fix some comments and other minor sundry things.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33873 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
471feac1b297b9458de18d973af371bf7f10296b 04-Feb-2007 Reid Spencer <rspencer@reidspencer.com> Ensure that visibility and section are properly propagated.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33872 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
8bef0373f1b8fab20b9acd277377ca01d72bac7e 04-Feb-2007 Reid Spencer <rspencer@reidspencer.com> Back out last revision which was committed by accident.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33871 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
3dad8dc367dc511318a3eb136982c13c77db7b04 04-Feb-2007 Reid Spencer <rspencer@reidspencer.com> Make sure that section and visibility are properly propagated.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33870 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
5dfbaf1fe3fa6914095cc55cde20b1ed25187b56 01-Feb-2007 Andrew Lenharth <andrewl@lenharth.org> preserve sections of globals


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33756 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
5cbf985dcbc89fba3208e7baf8b6f488b06d3ec9 30-Jan-2007 Reid Spencer <rspencer@reidspencer.com> For PR1136: Rename GlobalVariable::isExternal as isDeclaration to avoid
confusion with external linkage types.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33663 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
ec9bfdc152a870d3c62377ed6855fb3bff69511c 29-Jan-2007 Chris Lattner <sabre@nondot.org> Read from the right place.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33611 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
c36357c406911ded5a0e2924998d885815370fdb 29-Jan-2007 Chris Lattner <sabre@nondot.org> Fix PR1139


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33610 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
26f238589f9bb372d24b6fb2bc32edbf046fd9ee 26-Jan-2007 Reid Spencer <rspencer@reidspencer.com> For PR761:
The Module::setEndianness and Module::setPointerSize methods have been
removed. Instead you can get/set the DataLayout. Adjust thise accordingly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33530 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
a54b7cbd452b3adb2f51346140d996b29c2cdb30 12-Jan-2007 Reid Spencer <rspencer@reidspencer.com> For PR1064:
Implement the arbitrary bit-width integer feature. The feature allows
integers of any bitwidth (up to 64) to be defined instead of just 1, 8,
16, 32, and 64 bit integers.

This change does several things:
1. Introduces a new Derived Type, IntegerType, to represent the number of
bits in an integer. The Type classes SubclassData field is used to
store the number of bits. This allows 2^23 bits in an integer type.
2. Removes the five integer Type::TypeID values for the 1, 8, 16, 32 and
64-bit integers. These are replaced with just IntegerType which is not
a primitive any more.
3. Adjust the rest of LLVM to account for this change.

Note that while this incremental change lays the foundation for arbitrary
bit-width integers, LLVM has not yet been converted to actually deal with
them in any significant way. Most optimization passes, for example, will
still only deal with the byte-width integer types. Future increments
will rectify this situation.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33113 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
78d033e086e19e016273de014f9214aa6f3f844b 06-Jan-2007 Reid Spencer <rspencer@reidspencer.com> For PR411:
Take an incremental step towards type plane elimination. This change
separates types from values in the symbol tables by finally making use
of the TypeSymbolTable class. This yields more natural interfaces for
dealing with types and unclutters the SymbolTable class.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32956 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
8753c447a5f8eec1421331c40ffbb72c6d411f78 15-Dec-2006 Andrew Lenharth <andrewl@lenharth.org> extern_weak linkage. fixes PR1038


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32603 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
4da49122f3f3c8da68a52723d846b88c72166a68 12-Dec-2006 Reid Spencer <rspencer@reidspencer.com> Change inferred getCast into specific getCast. Passes all tests.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32469 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
1a097e30d39e60303ae2b19f7a56e813f3e3c18e 08-Dec-2006 Bill Wendling <isanbard@gmail.com> Don't use <sstream> in Streams.h but <iosfwd> instead.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32340 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
e81561909d128c6e2d8033cb5465a49b2596b26a 07-Dec-2006 Bill Wendling <isanbard@gmail.com> Changed llvm_ostream et all to OStream. llvm_cerr, llvm_cout, llvm_null, are
now cerr, cout, and NullStream resp.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32298 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
78ee7b78c3c47b71c4b7a1475438d6574216a64b 01-Dec-2006 Anton Korobeynikov <asl@math.spbu.ru> Introducing external weak linkage. Darwin codegen should be added later.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32052 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
41edad7e4b8872414564dea5fb41fa6194375355 27-Nov-2006 Bill Wendling <isanbard@gmail.com> Removed #include <iostream> and replaced with llvm_* streams.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31936 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
b324bd735ff5c99a52cd3c3f5d01c0e1398a2d3a 09-Nov-2006 Chris Lattner <sabre@nondot.org> silence warnings


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31587 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
b74ed07bfd3af42331b1964c24c39912610a08f4 14-Sep-2006 Anton Korobeynikov <asl@math.spbu.ru> Adding dllimport, dllexport and external weak linkage types.
DLL* linkages got full (I hope) codegeneration support in C & both x86
assembler backends.
External weak linkage added for future use, we don't provide any
codegeneration, etc. support for it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30374 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
27d672136a57519095a3ef20161697749cffb57c 15-Jul-2006 Chris Lattner <sabre@nondot.org> eliminate some ugly code, using ConstantExpr::getWithOperands instead.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29149 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
1127315562b221010040925980040fd4f65bdb1c 16-Jun-2006 Chris Lattner <sabre@nondot.org> Fix Regression/Linker/2006-06-15-GlobalVarAnment.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28812 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
620fd68b1086b4d99b23951357299bee357aa62a 01-Jun-2006 Chris Lattner <sabre@nondot.org> Fix linking of inline asm objects.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28640 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
9273b0403e992bbdf4f9e7c48f990c7658610b8a 08-Apr-2006 Chris Lattner <sabre@nondot.org> Add shufflevector support


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27515 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
39c61fd5274509f34766073f10aaa20c99068804 07-Apr-2006 Evan Cheng <evan.cheng@apple.com> Add code to RemapOperand() to handle Instruction::ExtractElement and
Instruction::InsertElement.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27477 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
6631601eeda2300abdce11fbd7a7a3daa2694d39 24-Jan-2006 Chris Lattner <sabre@nondot.org> Rename method


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25571 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
e1b2e14f92e8e9da1eb4854511a881cf9c22af3c 24-Jan-2006 Chris Lattner <sabre@nondot.org> Add support for linking inline asm


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25560 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
a88eb9287eb14ba62ca6324b2b249e0ae9fe3309 20-Jan-2006 Chris Lattner <sabre@nondot.org> add support for ConstantPacked to the linker


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25467 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
ed74a4ef3b813bed0c0f4bb5af42229d50133da2 06-Dec-2005 Chris Lattner <sabre@nondot.org> Fix test/Regression/Linker/2005-12-06-AppendingZeroLengthArrays.ll and
PR662. Thanks to Markus for providing me with a ton of files to
reproduce the problem!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24619 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
dd04df0ec33a903ee7fc747701bafde622f77d8b 08-Jul-2005 Reid Spencer <rspencer@reidspencer.com> For PR495:
Get rid of the difference between file paths and directory paths. The Path
class now simply stores a path that can refer to either a file or a
directory. This required various changes in the implementation and interface
of the class with the corresponding impact to its users. Doxygen comments were
also updated to reflect these changes. Interface changes are:

appendDirectory -> appendComponent
appendFile -> appendComponent
elideDirectory -> eraseComponent
elideFile -> eraseComponent
elideSuffix -> eraseSuffix
renameFile -> rename
setDirectory -> set
setFile -> set

Changes pass Dejagnu and llvm-test/SingleSource tests.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22349 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
cb9048a6e813ca0c89f59375f3aa15ae49e153b4 09-May-2005 Chris Lattner <sabre@nondot.org> Preserve CC's when linking modules


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21799 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
f976c856fcc5055f3fc7d9f070d72c2d027c1d9d 22-Apr-2005 Misha Brukman <brukman+llvm@gmail.com> Remove trailing whitespace


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21422 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
e4d5c441e04bdc00ccf1804744af670655123b07 15-Mar-2005 Chris Lattner <sabre@nondot.org> This mega patch converts us from using Function::a{iterator|begin|end} to
using Function::arg_{iterator|begin|end}. Likewise Module::g* -> Module::global_*.

This patch is contributed by Gabor Greif, thanks!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20597 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
b9476d9b45025905146f40370056a985f305bc8e 19-Feb-2005 Chris Lattner <sabre@nondot.org> Eliminate silly warnings from the linker of the form:

WARNING: Type conflict between types named 'union.._604.'.
Src=' %union.._604.'.
Dest=' %union.._604.'


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20252 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
e6f8c5a71682ffcc33d3c83a40821ded8f2c8033 12-Feb-2005 Chris Lattner <sabre@nondot.org> Allow globals to be of different const'nesses when we link.
This finally resolves PR502, PR450,
and test/Regression/Linker/2005-02-12-ConstantGlobals{,-2}.ll correctly


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20135 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
0ba9e211bed7813949aaca97e6b15579c8188e05 13-Dec-2004 Reid Spencer <rspencer@reidspencer.com> Make LinkModules a static member function


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18859 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
152f19ac6514ec29e183ddcdf2ea71599638dc4c 10-Dec-2004 Chris Lattner <sabre@nondot.org> Make sure to link the target-triple as well, so it ends up in the .llvm.bc file


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18774 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
d37a75b9be3a31691c9e492508bf0c389ad2024d 08-Dec-2004 Chris Lattner <sabre@nondot.org> Revert this disgusting hack, John has a much nicer solution


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18611 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
a6a2bdd0e023192b8fb31679dbde6bbb1b584547 08-Dec-2004 Chris Lattner <sabre@nondot.org> Add a disgusting hack to work around a libstdc++ issue. This code should
be removed when PR400 is resolved.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18610 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
c8ef1edc63508d21bf8e38112fc125cde01fdbb9 04-Dec-2004 Chris Lattner <sabre@nondot.org> Fix linkage of mismatched weak globals. This unbreaks 300.twolf


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18494 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
aee38ea5698fd770bb41d01d06542cb849e131a4 03-Dec-2004 Chris Lattner <sabre@nondot.org> Significantly rework linker support for global variables, allowing it to
correctly link globals whose LLVM types do not match.

This fixes several of the F2C SPEC FP benchmarks, which were failing this
due to the implementation of common blocks used by f2c.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18465 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
719012d6254ee425464f034250176283fb96793b 25-Nov-2004 Reid Spencer <rspencer@reidspencer.com> Remove blank comment lines for uniformity.
Make sure lines don't exceed 80 cols.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18242 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
a63acbfeab516203849fced87a036f236babcea5 16-Nov-2004 Chris Lattner <sabre@nondot.org> Don't increment a dead iterator


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17904 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
0033baf94e049e075f3ba4700c109779e2d7c131 16-Nov-2004 Chris Lattner <sabre@nondot.org> Simplify the remapper by only needing one map, since the body of the functions
being linked do not need to be remapped any longer.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17900 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
4bbfbff119acab90fc67cd3d01b156bf88832286 16-Nov-2004 Chris Lattner <sabre@nondot.org> Take advantage of the fact that we are allowed to clobber the input module
by splicing function bodies from the src module to the destination module.

This speeds up linking quite a bit, e.g. gccld time on 176.gcc from 26s -> 20s
when forming the .rbc file, with a profile build. One of the really strange
but cool effects of this patch is that it speeds up the optimizers as well,
from 12s -> 10.7s, presumably because of better locality???

In any case, this is just a first step. We can trivially get rid of the
LocalMap now and do other simplifications.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17893 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
242e525edcb965d54c73d016ccdaa4baaa9f083c 16-Nov-2004 Chris Lattner <sabre@nondot.org> The second arg may be clobbered by this function


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17880 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
7cc371a7958c7a049c679a59023c3c8c83f6cc83 15-Nov-2004 Reid Spencer <rspencer@reidspencer.com> Linker.h moved to include/llvm from include/llvm/Support.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17807 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
7f49602e5ac7186c9505a0496393dd624515b459 12-Nov-2004 Reid Spencer <rspencer@reidspencer.com> This file originated in lib/VMCore/Linker.cpp but now lives in
lib/Linker/LinkModules.cpp


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17694 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
07adb2836b8aa7a3872e33c285958f5937662b50 05-Nov-2004 Reid Spencer <rspencer@reidspencer.com> Stop propagating method names that violate the coding standard


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17498 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
b976e668165e1875a8f1eb7af800e33bb1e4393d 16-Oct-2004 Chris Lattner <sabre@nondot.org> Add support for undef and unreachable


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17041 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
d4984cca0ec95b3602955b8e41260d0d8b882129 05-Oct-2004 Chris Lattner <sabre@nondot.org> Make sure the const bit gets inherited correctly when linking declarations
of disagreeing constness. This fixes
test/Regression/Linker/ConstantGlobals[123].ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16692 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
57a0efa32240ef03ea318f9ba7680fd2b8609c6e 11-Sep-2004 Reid Spencer <rspencer@reidspencer.com> Implement support for dependent libraries. The "source" module's dependent
libraries list is merged into the "destination" module's list. Also, if the
source module is one of the dependent libraries, it is removed from the
list.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16282 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
72cf7df6a364c213a94d01e1f0f8d918940c8416 21-Aug-2004 Chris Lattner <sabre@nondot.org> Fix a nasty bug that Nate ran into. In particular, instead of emitting a 2+MB
error message, print out:

llvm-link: error linking in 'g.2.rbc': Global Variable Collision on
' %struct.D_Reduction* %d_reduction_10_gram' - External linkage globals have
different initializers

That's a bit more concise, huh?


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15958 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
aad2deb17c3e624cae4ebc1ed51fc5264fa1c0b8 05-Aug-2004 Chris Lattner <sabre@nondot.org> Fix another minor problem that exists if you ahve multiple functions with
nonunifiable types but the same name. Down with PR411!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15511 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
82b5b219dd3b9035442389ddcd58e6f859aae039 05-Aug-2004 Chris Lattner <sabre@nondot.org> Fix a typeo


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15510 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
868bbf35b079a7f356f6b2fbd9df7e66552bc57e 04-Aug-2004 Chris Lattner <sabre@nondot.org> Fix a major regression in my previous checkin


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15486 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
cc7ba49d85b66955516ff0d9574a70e1637dea36 04-Aug-2004 Alkis Evlogimenos <alkis@evlogimenos.com> Stop using getValues().


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15485 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
5a837defff581accc09048bea1cd839009e374a7 04-Aug-2004 Chris Lattner <sabre@nondot.org> FindGlobalNamed used to take 2.92s out of 8.39s running a profile build of
gccld -disable-opt on 252.eon.

This patch deletes it and replaces it with a map. The proper fix for this
is to fix PR411, but this will do in the short term.

gccld on eon now takes 5.51s, which is 50% faster than before this patch. :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15480 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
7b0c84dcf59b6ac3a27843fd8162ab36928fba35 04-Aug-2004 Chris Lattner <sabre@nondot.org> I swear I compiled this, really I did.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15467 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
c003628a612d3687fb77088a5894314210a65385 04-Aug-2004 Chris Lattner <sabre@nondot.org> Factor some code out, no substantial change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15466 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
fe41069070f1a4b2d58a996b1f82ff747d076435 04-Aug-2004 Chris Lattner <sabre@nondot.org> Concisify some code
Do not call FindGlobalNamed when we know we will ignore the result (because
we are not going to link a static symbol anyway). This speeds up
gccld -disable-opt on 252.eon from 8.63s to 8.39s.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15465 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
47b14a4a6a455c7be169cfd312fcbe796f0ad426 29-Jul-2004 Misha Brukman <brukman+llvm@gmail.com> Fix #includes of i*.h => Instructions.h as per PR403.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15334 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
00dc4796132933e76fe2b834ca087e42621c175a 18-Jul-2004 Reid Spencer <rspencer@reidspencer.com> bug 122:
- Replace ConstantPointerRef usage with GlobalValue usage
- Correct isa<Constant> for GlobalValue subclass


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14930 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
c28a224c68adf0464c275778af4bce762ad25d37 04-Jul-2004 Reid Spencer <rspencer@reidspencer.com> - #include <iostream> since its not in Value.h any more.
- constify use of Type* returned from symbol table.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14615 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
c837dd93cd20b7e37f70d9496ef63e213e4b4713 23-Jun-2004 Misha Brukman <brukman+llvm@gmail.com> Linker.h moved to include/llvm/Support


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14349 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
f70c22b019494723d0e706f93d6542dfaa6e73a5 17-Jun-2004 Chris Lattner <sabre@nondot.org> Rename Type::PrimitiveID to TypeId and ::getPrimitiveID() to ::getTypeID()


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14201 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
567bc2cc1ed4d610daceecbb4ff7f92ebde1b530 25-May-2004 Reid Spencer <rspencer@reidspencer.com> Convert to SymbolTable's new lookup and iteration interfaces.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13751 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
1438102576b94d6dac9bb18e8df291c4d632572d 31-Mar-2004 Chris Lattner <sabre@nondot.org> Fix linking of constant expr casts due to type resolution changes. With
this and the other patches 253.perlbmk links again.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12565 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
57cb9883aa4c82357594d4186858f175135be3b1 17-Feb-2004 Chris Lattner <sabre@nondot.org> Fix PR245: Linking weak and strong global variables is dependent on link order


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11565 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
de512b5b2edebe9c9021a92c7c7a9ae9fbc380d6 15-Feb-2004 Chris Lattner <sabre@nondot.org> Adjustments to support the new ConstantAggregateZero class


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11474 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
c6646ebdb957a3c613d389be8b0135271b8b8ece 12-Jan-2004 Chris Lattner <sabre@nondot.org> Remove use of ConstantExpr::getShift


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10792 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
f7703df4968084c18c248c1feea9961c19a32e6a 09-Jan-2004 Chris Lattner <sabre@nondot.org> Finegrainify namespacification


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10727 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
adbc0b5287bf36893cdcae2440d48b3cb3489e38 20-Nov-2003 Chris Lattner <sabre@nondot.org> Spew symbolic types!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10110 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
d0fde30ce850b78371fd1386338350591f9ff494 11-Nov-2003 Brian Gaeke <gaeke@uiuc.edu> Put all LLVM code into the llvm namespace, as per bug 109.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9903 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
d981f8af79be9ea647d593531091740a3a27a85f 05-Nov-2003 Chris Lattner <sabre@nondot.org> Further fixes for PR93


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9738 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
700867bb69ae1469f2b20005a79fd133e83fd552 04-Nov-2003 John Criswell <criswell@uiuc.edu> Checking in Chris's suggestions:
Added assert() to ensure symbol table is well formed.
Added code to remember the value that was found; resolving types can change
the symbol table and invalidate the value of the iterator.
Added comments to the ResolveTypes() function (mainly for my own benefit).
Please feel free to correct the comments if they are not accurate.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9693 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
35956558e26e655aaa2e8ad6ee405365271869a4 27-Oct-2003 Chris Lattner <sabre@nondot.org> Fix test: Linker/2003-10-27-LinkOncePromote.ll
Fix PR58


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9530 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
aeb18ce9c012f8554f48bae9bb32351c6eeaa26c 22-Oct-2003 Chris Lattner <sabre@nondot.org> Fix bug: Linker/2003-10-21-ConflictingTypesTolerance.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9357 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
f85770c9a670dc5c360015125389c389ae9592c7 21-Oct-2003 Chris Lattner <sabre@nondot.org> Fix message to make more sense and confuse Chris less


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9354 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
b576c94c15af9a440f69d9d03c2afead7971118c 20-Oct-2003 John Criswell <criswell@uiuc.edu> Added LLVM project notice to the top of every C++ source file.
Header files will be on the way.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9298 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
72ac148d4964fbff950fe11a0eeeda73973b849b 16-Oct-2003 Chris Lattner <sabre@nondot.org> Add support for 'weak' linkage.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9171 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
cf00c4ab3ba308d45d98c5ccab87362cf802facb 10-Oct-2003 Misha Brukman <brukman+llvm@gmail.com> Fix spelling.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9027 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
841e00b96295a2b66cb7573e961656d28a6cb12b 28-Aug-2003 Chris Lattner <sabre@nondot.org> Fix bug where we considered function types equivalent even if they had differing numbers of arguments


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8178 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
77c5f733ac51c122ee3f75b8cc247b923d472909 24-Aug-2003 Chris Lattner <sabre@nondot.org> Fix bug: Linker/2003-08-23-GlobalVarLinking.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8130 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
873c5e7859c1534bf92c9e2747f2b70685059598 24-Aug-2003 Chris Lattner <sabre@nondot.org> Implement: Linker/2003-08-24-InheritPtrSize.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8129 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
f44c6051e02ddb207d5928b4ef3cde956d2b5025 23-Aug-2003 Chris Lattner <sabre@nondot.org> Do not consider any types that exist in the global symbol table!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8084 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
e3092c94ad2e3af96f37a0a8186149acbbd9700a 23-Aug-2003 Chris Lattner <sabre@nondot.org> Fix bug: Linker/2003-08-23-RecursiveOpaqueTypeResolve.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8083 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
fcd0234de65fc07fb06f3245b60e82bdba78c745 23-Aug-2003 Chris Lattner <sabre@nondot.org> Implement Linker/2003-08-23-GlobalVarLinking.ll, which should fix 176.gcc


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8080 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
9732be769e57f1dec03f046ab957053048f60e40 22-Aug-2003 Chris Lattner <sabre@nondot.org> Fix typeo


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8059 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
43f4ba8c7d19664bb5de73a7b391b67061f25d22 22-Aug-2003 Chris Lattner <sabre@nondot.org> The process of linking types can cause their addresses to become invalid. For this reason, we must use TypeHandles!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8057 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
e76c57ad467ed57f09f2a3ef51628d4b6eb2b304 22-Aug-2003 Chris Lattner <sabre@nondot.org> Implement Linker/2003-08-20-OpaqueTypeResolve.ll

Hopefully this will fix the 176.gcc spec test as well.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8051 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
4c00e53b81de81ecf4ba0c4e287ea230c79e82ae 15-May-2003 Chris Lattner <sabre@nondot.org> Fix Bug: Linker/2003-05-15-TypeProblem.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6225 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
f41464618f41b92cf0a0bd14ccc57bce727fb33d 14-May-2003 Chris Lattner <sabre@nondot.org> Fix major problem with appending linkage changes


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6185 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
8166e6eef6518da6f1f805e0d5e2bb22c15dd49c 13-May-2003 Chris Lattner <sabre@nondot.org> Implement linkage of appending global variables!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6178 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
c2b97d43a074445c6856d69538a95de09450c26e 23-Apr-2003 Chris Lattner <sabre@nondot.org> Fix Bug: Linker/2003-04-23-LinkOnceLost.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5879 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
43a9994c0164848d44527060da72985c75183a48 22-Apr-2003 Chris Lattner <sabre@nondot.org> Add warning when linking modules with disagreeing target properties


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5845 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
2719bac90525985f4ebb97324b4c087d47b54384 21-Apr-2003 Chris Lattner <sabre@nondot.org> Fix bug: 2003-01-30-LinkerRename.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5828 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
0fec08eb58dd9fffeb72c584aa61a59d71111c8d 21-Apr-2003 Chris Lattner <sabre@nondot.org> Fix linking a function with qualifiers to a external function declaration:
Fixed bug: Linker/2003-04-21-Linkage.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5827 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
4ad02e726d9b634372b037d4b352d8b63bb9e849 16-Apr-2003 Chris Lattner <sabre@nondot.org> Add new linkage types to support a real frontend


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5786 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
2f6bb2bce13084dfc4c8acf47f9eae0578267aaa 30-Jan-2003 Chris Lattner <sabre@nondot.org> * Fix linking of opaque types and their non-opaque versions
* Fix bug: Linker/2003-01-30-LinkerTypeRename.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5441 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
5c2d335d86579941b71816196a95a64b277e8963 30-Jan-2003 Chris Lattner <sabre@nondot.org> Eliminate using decls


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5439 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
b91b657e026e86082b665cc875c2881ed075b68d 03-Dec-2002 Chris Lattner <sabre@nondot.org> Fix big bug introduced with symbol table changes


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4885 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
6e6026b46569b01f8f6d4dcdb6c899c3a9c76b3e 20-Nov-2002 Chris Lattner <sabre@nondot.org> - Eliminated the deferred symbol table stuff in Module & Function, it really
wasn't an optimization and it was causing lots of bugs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4779 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
69da5cf26143e4542d4bf8c78ffac6d079efe5c9 13-Oct-2002 Chris Lattner <sabre@nondot.org> - Change Function's so that their argument list is populated when they are
constructed. Before, external functions would have an empty argument list,
now a Function ALWAYS has a populated argument list.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4149 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
d149c053cdbb406b7b5dff24127b4c509420893e 23-Sep-2002 Chris Lattner <sabre@nondot.org> Insert resolved constants into the global map so they are reused correctly.
This bug was exposed linking the SPEC benchmark suite.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3888 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
b319faff77a5bb12e753c45662f6c532b77f0b91 20-Aug-2002 Chris Lattner <sabre@nondot.org> fixed bug: test/Regression/Linker/2002-08-20-ConstantExpr.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3412 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
ad333484ea5ae976b83e35ccd3f6cfa6e71290e2 14-Aug-2002 Chris Lattner <sabre@nondot.org> Remove support for Not ConstantExpr. This simplifies the unary case to only
have to support the cast instruction, so the function is renamed to getCast.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3328 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
e8e4605021141d689493132a9c7c6fce6294937f 30-Jul-2002 Chris Lattner <sabre@nondot.org> Cleanup ConstantExpr handling:
* Correctly delete TypeHandles in AsmParser. In addition to not leaking
memory, this prevents a bug that could have occurred when a type got
resolved that the constexpr was using
* Check for errors in the AsmParser instead of hitting assertion failures
deep in the code
* Simplify the interface to the ConstantExpr class, removing unneccesary
parameters to the ::get* methods.
* Rename the 'getelementptr' version of ConstantExpr::get to
ConstantExpr::getGetElementPtr


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3160 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
ad772a7188d21f21e9b92d70755018a083a6efa2 30-Jul-2002 Chris Lattner <sabre@nondot.org> Remove FIXME's that aren't really needed after all.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3158 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
b1443b17491163db6a207959d10e6d6d83cd28fd 25-Jul-2002 Chris Lattner <sabre@nondot.org> *** empty log message ***


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3072 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
e306d94782b1c608857738279852dcc050c66004 18-Jul-2002 Chris Lattner <sabre@nondot.org> * Rewrite loop to be slightly more efficient (arguably)
* Fix a MAJOR thinko that was causing bad links to happen on Spec


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2953 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
6cdf1971bdf88ddd9a7d46b5f5f975497d68c38e 18-Jul-2002 Chris Lattner <sabre@nondot.org> Implement linking of ConstExprs


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2946 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
18961504fc2b299578dba817900a0696cf3ccc4d 25-Jun-2002 Chris Lattner <sabre@nondot.org> *** empty log message ***


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2777 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
c8cc4cb03bd90f89be7fe1649542a2d5ae689632 07-May-2002 Chris Lattner <sabre@nondot.org> Updates to move some header files out of include/llvm/Transforms into
the Scalar and Utils subdirectories


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2523 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
31bcdb822fe9133b1973de51519d34e5813a6184 28-Apr-2002 Chris Lattner <sabre@nondot.org> Split ConstantVals.h into Constant.h and Constants.h


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2378 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
73e214244f2403b5ba0ef81b8839600f3c8ffebc 09-Apr-2002 Chris Lattner <sabre@nondot.org> Move FunctionArgument out of iOther.h into Argument.h and rename class to
be 'Argument' instead of FunctionArgument.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2216 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
87182ae6baf28ca6da6ee4bc00cf1857f293acfe 08-Apr-2002 Chris Lattner <sabre@nondot.org> Eliminate explicit use of Writer library, using debug dump output instead.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2147 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
6bfd6a578a3a4fa95c585c988ee712ba880f9923 29-Mar-2002 Chris Lattner <sabre@nondot.org> s/Method/Function


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2034 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
79df7c0aaa18129e55968c8783ef8346807bd4af 26-Mar-2002 Chris Lattner <sabre@nondot.org> Change references from Method to Function
change references from MethodARgument to FunctionArgument


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1991 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
9b638019ca8870f418e3b42b39dd34dc7deebb2d 15-Mar-2002 Chris Lattner <sabre@nondot.org> Cleanup error message output a bit


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1879 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
221d688a5ef21a22c2368c9fff0e92d7966c95e5 12-Feb-2002 Chris Lattner <sabre@nondot.org> Method.h no longer includes BasicBlock.h
Method::inst_* is now in llvm/Support/InstIterator.h
GraphTraits specializations for BasicBlock and Methods are now in llvm/Support/CFG.h


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1746 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
697954c15da58bd8b186dbafdedd8b06db770201 20-Jan-2002 Chris Lattner <sabre@nondot.org> Changes to build successfully with GCC 3.02


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1503 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
7a1767520611d9ff6face702068de858e1cadf2c 04-Dec-2001 Chris Lattner <sabre@nondot.org> Renamed inst_const_iterator -> const_inst_iterator
Renamed op_const_iterator -> const_op_iterator
Renamed PointerType::getValueType() -> PointerType::getElementType()


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1408 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
e9bb2df410f7a22decad9a883f7139d5857c1520 03-Dec-2001 Chris Lattner <sabre@nondot.org> Rename ConstPoolVal -> Constant
Rename ConstPool* -> Constant*
Rename ConstPoolVals.h -> ConstantVals.h


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1407 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
e4d25aad16bfc2a26595f6255fc2bfdaa6c532a7 26-Nov-2001 Chris Lattner <sabre@nondot.org> Implement support for internal methods


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1380 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
161aa5ad930bcde8b4e97c843880fbb0509ea83c 07-Nov-2001 Chris Lattner <sabre@nondot.org> Add #includes to enable buiding in Release mode


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1174 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
2c236f3e20a0fb84b5948efa6bb7bb60d759cb32 03-Nov-2001 Chris Lattner <sabre@nondot.org> Don't forget to link type names together too. Fix for Olden/mst benchmark


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1094 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
2d3e8bba628843bf2dffa21f69d9b45098d3bfc4 03-Nov-2001 Chris Lattner <sabre@nondot.org> Add extra code for debugging linker problems


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1091 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
43a6f2e332eb54796a2e85188aa89c0dfee03ef3 29-Oct-2001 Chris Lattner <sabre@nondot.org> Pull method symbols over when linking. Otherwise the result of the link will appear stripped


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1033 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
2301a070f6fde287db167e134d53b203fc259e58 28-Oct-2001 Chris Lattner <sabre@nondot.org> Remove non linking related stuff


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1015 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
9466f5113ba859677a28887c3c7143065e702019 28-Oct-2001 Vikram S. Adve <vadve@cs.uiuc.edu> Added name-mangling routines for future use.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1003 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
c2d774b6c1d38421c435b6d3cfaa10402c900aeb 23-Oct-2001 Chris Lattner <sabre@nondot.org> Fix problem linking in a method prototype when a method body exists


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@965 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
c18545dc9e5c8d98ea9089af8702a6cf563a8dfd 15-Oct-2001 Chris Lattner <sabre@nondot.org> Rename ConstPoolPointerReference to ConstPoolPointerRef - My fingers get tired typing that much


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@822 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
8d2de8a82cce67513debee7a3fa5aca0189b4105 15-Oct-2001 Chris Lattner <sabre@nondot.org> Implement linking of global variable constant references


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@817 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
5c377c524a6929cdaa683f3f034b3fc01526b264 15-Oct-2001 Chris Lattner <sabre@nondot.org> Implement linker. It's 95% working now.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@810 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp
52f7e908cb634f9b9b539d5c6670b8a065478915 13-Oct-2001 Chris Lattner <sabre@nondot.org> Start of a linker


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@775 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Linker/LinkModules.cpp