[PATCH] D29104: Add !associated metadata.

Peter Collingbourne via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 17 16:22:16 PST 2017


pcc added inline comments.


================
Comment at: include/llvm/MC/MCSectionELF.h:95
+
+  const MCSymbol *getAssociatedSymbol() const { return AssociatedSymbol; }
 
----------------
eugenis wrote:
> pcc wrote:
> > I don't quite follow why you need to change this from storing a section to a symbol.
> Because we need the symbol name when printing textual assembly.
> 
I see. Could you separate the printer fix out into a separate change please?


================
Comment at: lib/CodeGen/TargetLoweringObjectFileImpl.cpp:370
+
+  EmitUniqueSection |= GO->getMetadata(LLVMContext::MD_associated) != nullptr;
+
----------------
Remove this line.


================
Comment at: lib/MC/MCSectionELF.cpp:157
 
+  if (Flags & ELF::SHF_LINK_ORDER && AssociatedSymbol) {
+    OS << ",";
----------------
Would AssociatedSymbol ever be null?


Repository:
  rL LLVM

https://reviews.llvm.org/D29104





More information about the llvm-commits mailing list