[PATCH] D48203: [SanitizerCoverage] Add associated metadata to pc-tables.
Evgenii Stepanov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 15 09:22:49 PDT 2018
eugenis added a comment.
Did you try BFD with more than one function? There was a fun bug where the "first" (for some definition of the word) input section of an output section was treated differently from the rest.
================
Comment at: llvm/lib/Transforms/Instrumentation/SanitizerCoverage.cpp:601
FunctionPCsArray = CreatePCArray(F, AllBlocks);
- GlobalsToAppendToUsed.push_back(FunctionPCsArray);
+ MDNode *MD = MDNode::get(F.getContext(), ValueAsMetadata::get(&F));
+ FunctionPCsArray->addMetadata(LLVMContext::MD_associated, *MD);
----------------
I think pctable needs to be in llvm.compiler.used.
!associated alone will not prevent it being thrown away.
https://reviews.llvm.org/D48203
More information about the llvm-commits
mailing list