[PATCH] D29104: Add !associated metadata.
Peter Collingbourne via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 17 15:50:26 PST 2017
pcc added inline comments.
================
Comment at: include/llvm/MC/MCSectionELF.h:95
+
+ const MCSymbol *getAssociatedSymbol() const { return AssociatedSymbol; }
----------------
I don't quite follow why you need to change this from storing a section to a symbol.
================
Comment at: lib/CodeGen/TargetLoweringObjectFileImpl.cpp:220
+ GlobalObject *GO = dyn_cast<GlobalObject>(VM->getValue());
+ return dyn_cast<MCSymbolELF>(TM.getSymbol(GO));
+}
----------------
What if GO is null? (This could happen if we RAUW the GlobalObject with some other constant.)
I think the right behavior in that case would be to return null from this function.
Repository:
rL LLVM
https://reviews.llvm.org/D29104
More information about the llvm-commits
mailing list