[PATCH] D52119: [SanitizerCoverage] Prevent /OPT:REF from stripping constructors
Peter Collingbourne via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 14 23:00:05 PST 2018
pcc added inline comments.
================
Comment at: llvm/trunk/lib/Transforms/Instrumentation/SanitizerCoverage.cpp:311
+ CtorFunc->setLinkage(GlobalValue::WeakODRLinkage);
+ SmallString<20> PartialIncDirective("/include:");
+ // Get constructor's mangled name in order to support i386.
----------------
Instead of this you could have done `appendToUsed(M, CtorFunc);`, we automatically emit `/include` directives for symbols in `llvm.used`.
http://llvm-cs.pcc.me.uk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp#1553
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D52119/new/
https://reviews.llvm.org/D52119
More information about the llvm-commits
mailing list