Is extern_weak a legal linkage for function definitions?

Hi,

The LLVM language reference doesn't say that extern_weak is illegal for
function definitions, but it seems this restriction is enforced in the
code in some places:

However it is possible to create a bitcode file where a function
definition has extern_weak linkage. Are these restrictions in
the code wrong, or do we just need to update the language reference?

-Tom

I don't think it should be valid. What are the semantics you would
expect an extern_weak definition to have?

Cheers,
Rafael

I don't think it should be valid. What are the semantics you would
expect an extern_weak definition to have?

I'm not sure. I just have a test case that uses extern_weak, which
crashes the backend, and I'm trying to figure out if the bug is in
the backend or in the test.

-Tom