How do I set WeakDefDirective for a target?


I’m a little confused over the use of WeakDefDirective & getWeakDefDirective()
as it seems to be used differently to WeakRefDirective & getWeakRefDirective().

WeakDefDirective seems to be a boolean, used by AsmPrinter::EmitLinkage(), to decide if special stuff needs to be done.
As I just want “weak”, I should leave WeakDefDirective as null.
Is this right?

It would be nice if there was a additional hasWeakDefDirective that a target could specify (default false).
Also should MCAsmStreamer::EmitSymbolAttribute() emitted MAI->getWeakDefDirective() rather than “\t.weak_definition\t”?