1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 11:02:59 +02:00
Commit Graph

149 Commits

Author SHA1 Message Date
Anton Korobeynikov
ddb93e7a02 Turn StripPointerCast() into a method
llvm-svn: 50836
2008-05-07 22:54:15 +00:00
Anton Korobeynikov
ef80f5dbca If weak GlobalVariable was bitcast'ed to different type during linking
we will need to strip all casts for intializer lookup.

llvm-svn: 50776
2008-05-06 22:52:54 +00:00
Owen Anderson
8aaa632351 Revert r49614. As Dan pointed out, some of these aren't correct.
llvm-svn: 49657
2008-04-14 17:38:21 +00:00
Owen Anderson
b54defaff0 Replace calls of the form V1->setName(V2->getName()) with V1->takeName(V2),
which is significantly more efficient.

llvm-svn: 49614
2008-04-13 19:15:17 +00:00
Gabor Greif
6c6b8a57f3 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.

llvm-svn: 49277
2008-04-06 20:25:17 +00:00
Chris Lattner
d141d16ed7 Change the MemoryBuffer::getFile* methods to take just a pointer to the
start of a filename, not a filename+length.  All clients can produce a
null terminated name, and the system api's require null terminated 
strings anyway.

llvm-svn: 49041
2008-04-01 18:04:03 +00:00
Anton Korobeynikov
a69bd8b0e6 Ultimately resolve aliases during linking, if possible
llvm-svn: 48259
2008-03-11 22:51:09 +00:00
Anton Korobeynikov
da7746cf43 Fix thinko: alias always defines new symbol. Even is aliasee itself is undefined.
llvm-svn: 48203
2008-03-11 00:24:53 +00:00
Anton Korobeynikov
6d98df2a25 Add sanity checks
llvm-svn: 48184
2008-03-10 22:36:53 +00:00
Anton Korobeynikov
ada9acedd4 Typo: 'function' => 'alias'
llvm-svn: 48183
2008-03-10 22:36:35 +00:00
Anton Korobeynikov
25b1121a28 Syntactic sugar'ify stuff :)
llvm-svn: 48182
2008-03-10 22:36:08 +00:00
Anton Korobeynikov
4a897017af Always run 'make check' :) Fix fallout from prev. commit: query for possible
alias destination only if we don't have anything to link to

llvm-svn: 48181
2008-03-10 22:35:31 +00:00
Anton Korobeynikov
24360dead3 Make error messages to have common style
llvm-svn: 48180
2008-03-10 22:34:46 +00:00
Anton Korobeynikov
a17ceb586c Properly link globals with aliases
llvm-svn: 48179
2008-03-10 22:34:28 +00:00
Anton Korobeynikov
d33dd5acd2 Remove the LinkGlobal weirderness in common linking phase.
llvm-svn: 48177
2008-03-10 22:33:53 +00:00
Anton Korobeynikov
7ce7d7173a Typo
llvm-svn: 48176
2008-03-10 22:33:22 +00:00
Ted Kremenek
b05e945be4 Fix some compilation errors on msvc:
- "Redefinition of I" (iterator masks previous definition)
- include missing header file

Patch by Argiris Kirtzidis!

llvm-svn: 48115
2008-03-09 18:32:50 +00:00
Anton Korobeynikov
4ce7b6011b Clarify some important bits
llvm-svn: 48010
2008-03-07 18:34:50 +00:00
Anton Korobeynikov
d33aa31d4c Small cleanup: propagate thread-localness via generic routine.
No functionality change.

llvm-svn: 48009
2008-03-07 18:32:18 +00:00
Anton Korobeynikov
b66feb845f Missed patch from my last commit
llvm-svn: 47977
2008-03-05 23:21:39 +00:00
Anton Korobeynikov
d4e00c2d59 Resolve aliases to aliasees, where possible
llvm-svn: 47975
2008-03-05 23:08:47 +00:00
Anton Korobeynikov
76b5b2d294 Handle functions as targets during linking of aliases as well
llvm-svn: 47974
2008-03-05 23:08:16 +00:00
Anton Korobeynikov
f2f352ec48 Try hard to link aliases. Checks can be too strict by now.
llvm-svn: 47968
2008-03-05 22:22:46 +00:00
Anton Korobeynikov
79f6795ebb Remember the source->dest mapping when copying aliases. This fixes PR2054
llvm-svn: 47945
2008-03-05 15:27:21 +00:00
Anton Korobeynikov
0d90b4596b Clarify the state-of-the-art
llvm-svn: 47944
2008-03-05 15:11:00 +00:00
Anton Korobeynikov
f9d4370f22 Properly populate lists of defined/undefined symbols in presence of aliases
llvm-svn: 47900
2008-03-04 20:16:11 +00:00
Lauro Ramos Venancio
8dc3548bdf Emit an error when a library is not found. It is the GNU ld behavior and it is expected by the configure scripts.
llvm-svn: 47674
2008-02-27 17:20:32 +00:00
Anton Korobeynikov
b2dfae5fed And final pack of warnings silencing
llvm-svn: 47372
2008-02-20 11:27:04 +00:00
Chris Lattner
699e5dbcee random cleanups.
llvm-svn: 47334
2008-02-19 18:49:08 +00:00
Chris Lattner
ad9a6ccb83 Remove attribution from file headers, per discussion on llvmdev.
llvm-svn: 45418
2007-12-29 20:36:04 +00:00
Chris Lattner
8193d4af33 remove attribution from lib Makefiles.
llvm-svn: 45415
2007-12-29 20:09:26 +00:00
Anton Korobeynikov
f12327cd32 Ignore functions with internal linkages during linking. This snipped mimics the
behaviour of LinkGlobals() function.

llvm-svn: 45375
2007-12-27 23:21:57 +00:00
Gordon Henriksen
90d48b077d Fixing several transforms which would drop the collector attribute
when copying functions.

llvm-svn: 45356
2007-12-25 22:16:06 +00:00
Duncan Sands
3602011bec 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.

llvm-svn: 44359
2007-11-27 13:23:08 +00:00
Dan Gohman
d5c936914c Use correct parentheses with the '&& "..."' idiom in an assert.
llvm-svn: 42750
2007-10-08 15:13:30 +00:00
Chris Lattner
2de224be98 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.

llvm-svn: 41174
2007-08-19 22:22:54 +00:00
Reid Spencer
056b656f99 Improve error handling in the linker by:
1. Eliminate redundant error messages. LinkInFile and LinkInArchive
   already call the error() method in each case so there's no use
   telling the user again that an item couldn't be linked in.

2. Improve the formatting of error messages (separating content).

3. Change the wording for the warning about unrecognized files. Make
   it clear that the file is being ignored.

llvm-svn: 41121
2007-08-16 07:47:30 +00:00
Reid Spencer
3860c113ab Ensure that error messages a propagated from calls to LinkInModule so they get
reported to the end user.

llvm-svn: 41117
2007-08-16 07:23:37 +00:00
Reid Spencer
c5f311aa70 Allow the filename "-" to be a place holder for stdin. This allows directing
stdin through llvm-ld and llvm-link.

llvm-svn: 40938
2007-08-08 19:52:29 +00:00
Reid Spencer
dd93d5abaa Report an error if one occurs in releaseModule.
llvm-svn: 40405
2007-07-22 21:39:37 +00:00
Gabor Greif
f5e225a756 eliminate residual cruft related to recognizing bytecode
files.
bitcode files are the only LLVM format left.

llvm-svn: 37945
2007-07-06 13:38:17 +00:00
Gabor Greif
5f705671e4 Here is the bulk of the sanitizing.
Almost all occurrences of "bytecode" in the sources have been eliminated.

llvm-svn: 37913
2007-07-05 17:07:56 +00:00
Lauro Ramos Venancio
04172124dd Fix a bug in my previous patch.
llvm-svn: 37778
2007-06-28 20:06:38 +00:00
Lauro Ramos Venancio
eb29d717b3 When linking two modules, we should copy the alias.
llvm-svn: 37776
2007-06-28 19:02:54 +00:00
Lauro Ramos Venancio
9907d0f8db Propagate alignment, section name and visibility when linking "appending
global values".
Fix noinline linkage.

llvm-svn: 37482
2007-06-06 22:01:12 +00:00
Chris Lattner
c684dbdb6b switch this to bitcode instead of bytecode
llvm-svn: 36867
2007-05-06 09:29:13 +00:00
Chris Lattner
c0fa93d591 add bitcode support
llvm-svn: 36855
2007-05-06 06:02:13 +00:00
Reid Spencer
db43279e9a If an archive is not recognized as an LLVM bytecode archive then declare
that it is native so that the linker will pass it on downstream. This avoids
a problem where the native link line fails because there is both a .so and
a .a file. The .a file gets processed as bytecode and then dropped from the
command line.

llvm-svn: 36584
2007-04-30 00:29:39 +00:00
Reid Spencer
d27ed404ea Dependent libraries could be native too.
llvm-svn: 36582
2007-04-30 00:00:10 +00:00
Anton Korobeynikov
081d3bdd9f Implement visibility checking during linking. Also implement protected
visibility support for bitcode.

llvm-svn: 36577
2007-04-29 20:56:48 +00:00