llvm-6502/test/Feature
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
..
aliases.ll Prevent alias from pointing to weak aliases. 2014-03-27 15:26:56 +00:00
alignment.ll
attributes.ll
basictest.ll
callingconventions.ll
calltest.ll
casttest.ll
cfgstructures.ll
cold.ll
const_pv.ll
constexpr.ll
constpointer.ll
escaped_label.ll
exception.ll
float.ll
fold-fpcast.ll
forwardreftest.ll
global_pv.ll
global_section.ll
globalredefinition3.ll
globalvars.ll
indirectcall2.ll
indirectcall.ll
inlineasm.ll
instructions.ll
intrinsic-noduplicate.ll Expose "noduplicate" attribute as a property for intrinsics. 2014-03-18 23:51:07 +00:00
intrinsics.ll
load_module.ll
md_on_instruction.ll
memorymarkers.ll
metadata.ll
minsize_attr.ll
NamedMDNode2.ll
NamedMDNode.ll
newcasts.ll
optnone-opt.ll
optnone.ll
packed_struct.ll
packed.ll
paramattrs.ll
ppcld.ll
prefixdata.ll
properties.ll
prototype.ll
README.txt
recursivetype.ll
simplecalltest.ll
small.ll
smallest.ll
sparcld.ll
terminators.ll
testalloca.ll
testconstants.ll
testlogical.ll
testtype.ll
testvarargs.ll
undefined.ll
unreachable.ll
varargs_new.ll
varargs.ll
vector-cast-constant-exprs.ll
weak_constant.ll
weirdnames.ll
x86ld.ll

This directory contains test cases for individual source features of LLVM.
It is designed to make sure that the major components of LLVM support all of the
features of LLVM, for very small examples.  Entire programs should not go here.

Regression tests for individual bug fixes should go into the test/Regression dir.