Rafael Espindola f165cf7ce8 Prevent alias from pointing to weak aliases.
This adds back r204781.

Original message:

Aliases are just another name for a position in a file. As such, the
regular symbol resolutions are not applied. For example, given

define void @my_func() {
  ret void
}
@my_alias = alias weak void ()* @my_func
@my_alias2 = alias void ()* @my_alias

We produce without this patch:

        .weak   my_alias
my_alias = my_func
        .globl  my_alias2
my_alias2 = my_alias

That is, in the resulting ELF file my_alias, my_func and my_alias are
just 3 names pointing to offset 0 of .text. That is *not* the
semantics of IR linking. For example, linking in a

@my_alias = alias void ()* @other_func

would require the strong my_alias to override the weak one and
my_alias2 would end up pointing to other_func.

There is no way to represent that with aliases being just another
name, so the best solution seems to be to just disallow it, converting
a miscompile into an error.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204934 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-27 15:26:56 +00:00
..
2012-07-16 19:35:43 +00:00
2014-02-16 07:31:05 +00:00
2011-10-22 12:39:25 +00:00
2011-11-23 04:03:08 +00:00
2013-10-15 23:33:07 +00:00
2012-05-19 23:34:59 +00:00
2013-10-15 23:33:07 +00:00
2013-10-15 23:33:07 +00:00
2011-09-30 23:21:11 +00:00
2013-09-16 22:22:07 +00:00
2012-10-25 17:50:05 +00:00
2013-03-06 00:17:04 +00:00
2013-03-06 00:17:04 +00:00
2013-03-06 00:17:04 +00:00
2014-01-11 21:06:00 +00:00
2013-08-27 08:39:25 +00:00
2013-10-15 23:33:07 +00:00
2013-10-15 23:33:07 +00:00
2014-01-16 06:31:20 +00:00
2014-01-24 17:20:08 +00:00
2013-10-15 23:33:07 +00:00
2013-10-15 23:33:07 +00:00
2011-08-19 04:30:24 +00:00
2011-08-27 04:53:41 +00:00
2013-10-15 23:33:07 +00:00
2012-06-19 02:17:35 +00:00
2013-10-15 23:33:07 +00:00
2013-10-15 23:33:07 +00:00
2013-10-15 23:33:07 +00:00
2013-10-15 23:33:07 +00:00
2012-05-24 22:08:29 +00:00
2013-10-15 23:33:07 +00:00
2013-10-15 23:33:07 +00:00
2013-10-15 23:33:07 +00:00
2013-10-15 23:33:07 +00:00
2013-10-15 23:33:07 +00:00
2013-10-15 23:33:07 +00:00
2013-08-21 17:14:31 +00:00
2013-10-16 02:27:33 +00:00
2013-12-11 08:38:42 +00:00
2013-12-11 08:38:42 +00:00
2013-10-15 23:33:07 +00:00
2013-10-15 23:33:07 +00:00
2014-01-24 17:20:08 +00:00
2013-10-15 23:33:07 +00:00
2013-10-15 23:33:07 +00:00
2013-10-15 23:33:07 +00:00
2013-11-14 06:05:49 +00:00
2011-11-08 00:09:27 +00:00
2013-08-12 12:43:26 +00:00
2014-03-21 00:30:24 +00:00
2013-12-11 04:10:41 +00:00
2013-10-15 23:33:07 +00:00
2014-02-25 20:01:08 +00:00
2013-10-15 23:33:07 +00:00
2013-03-01 18:40:30 +00:00
2013-02-25 23:01:03 +00:00
2012-09-12 21:43:09 +00:00
2013-03-01 19:23:37 +00:00
2012-08-31 20:12:31 +00:00
2012-09-17 18:05:20 +00:00
2012-10-01 16:44:04 +00:00
2013-10-15 23:33:07 +00:00
2012-10-23 21:40:15 +00:00
2012-10-29 17:57:12 +00:00
2013-02-12 16:07:27 +00:00
2013-02-20 18:04:21 +00:00
2013-03-20 02:33:21 +00:00
2013-03-14 06:57:42 +00:00
2013-10-15 17:51:02 +00:00
2013-10-15 17:51:58 +00:00
2013-12-03 09:17:32 +00:00
2013-11-02 00:10:02 +00:00
2013-11-22 17:56:57 +00:00
2013-11-25 18:05:22 +00:00
2013-11-26 20:31:31 +00:00
2013-10-15 23:33:07 +00:00
2012-09-26 08:24:51 +00:00
2013-10-15 23:33:07 +00:00
2013-10-15 23:33:07 +00:00
2013-10-31 17:50:45 +00:00
2012-09-26 08:24:51 +00:00
2013-09-19 23:00:28 +00:00
2012-11-08 07:28:54 +00:00
2013-10-15 23:33:07 +00:00
2012-04-20 23:36:09 +00:00
2013-09-23 16:57:52 +00:00
2013-10-15 23:33:07 +00:00
2014-01-24 17:20:08 +00:00
2013-10-15 23:33:07 +00:00
2013-02-19 17:11:48 +00:00
2013-10-15 23:33:07 +00:00
2013-10-15 23:33:07 +00:00
2013-10-15 23:33:07 +00:00
2012-06-01 05:00:54 +00:00
2013-10-15 23:33:07 +00:00
2013-11-17 10:53:19 +00:00
2013-10-15 23:33:07 +00:00
2012-03-30 00:26:54 +00:00
2013-10-15 23:33:07 +00:00
2013-10-15 23:33:07 +00:00
2013-03-15 00:10:23 +00:00
2011-11-07 23:10:43 +00:00
2014-01-11 21:06:00 +00:00
2014-02-28 18:44:39 +00:00
2013-10-15 23:33:07 +00:00
2013-10-15 23:33:07 +00:00
2011-11-08 00:03:24 +00:00
2014-02-16 07:31:05 +00:00
2013-10-15 23:33:07 +00:00
2013-10-15 23:33:07 +00:00
2013-12-05 05:44:44 +00:00
2013-03-26 22:47:01 +00:00
2013-10-15 23:33:07 +00:00
2013-10-15 23:33:07 +00:00