When applied to a global symbol, specifies that the symbol should be emitted
with weak linkage. An example use case is a library function that should be
overridable by user code.
Quote from the LLVM manual: "Note that weak linkage does not actually allow
the optimizer to inline the body of this function into callers because it
doesn’t know if this definition of the function is the definitive definition
within the program or whether it will be overridden by a stronger
definition."
When applied to a global symbol, specifies that the symbol should be emitted with weak linkage. An example use case is a library function that should be overridable by user code.
Quote from the LLVM manual: "Note that weak linkage does not actually allow the optimizer to inline the body of this function into callers because it doesn’t know if this definition of the function is the definitive definition within the program or whether it will be overridden by a stronger definition."