[llvm-dev] Is extern_weak a legal linkage for function definitions?

Rafael EspĂ­ndola via llvm-dev llvm-dev at lists.llvm.org
Fri Oct 7 10:47:12 PDT 2016


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

Cheers,
Rafael


On 7 October 2016 at 11:37, Tom Stellard via llvm-dev
<llvm-dev at lists.llvm.org> wrote:
> 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:
>
> https://github.com/llvm-mirror/llvm/blob/master/lib/AsmParser/LLParser.cpp#L4591
> https://github.com/llvm-mirror/llvm/blob/master/lib/CodeGen/AsmPrinter/AsmPrinter.cpp#L327
>
>
> 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
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev


More information about the llvm-dev mailing list