llvm-project/llvm/lib/Linker
David Chisnall 2c4a34aeef 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).

llvm-svn: 93052
2010-01-09 16:27:31 +00:00
..
CMakeLists.txt Initial support for the CMake build system. 2008-09-22 01:08:49 +00:00
LinkArchives.cpp random tidy 2009-11-09 04:18:23 +00:00
LinkItems.cpp Fix MemoryBuffer::getSTDIN to *not* return null if stdin is empty, this is a lame API. 2009-11-10 00:43:58 +00:00
LinkModules.cpp 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). 2010-01-09 16:27:31 +00:00
Linker.cpp Change this back to errs(). 2010-01-05 01:55:22 +00:00
Makefile Removed trailing whitespace from Makefiles. 2009-01-09 16:44:42 +00:00