To avoid adding an extern function to the global ctors list, apply the changes of D56538 also to MSan.
Details
Details
- Reviewers
chandlerc vitalybuka fedor.sergeev leonardchan - Commits
- rGae61627a39b4: Merging r351322: --------------------------------------------------------------…
rL353830: Merging r351322:
rG81101de5853b: [MSan] Apply the ctor creation scheme of TSan
rL351322: [MSan] Apply the ctor creation scheme of TSan
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
LGTM with some minor cleanups!
| llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp | ||
|---|---|---|
| 925 ↗ | (On Diff #181823) | Add a comment at the start of the lambda to remind the reader that this is used when we are the first to try and get the sanitizer ctor/init function to set it up? |
| 931 ↗ | (On Diff #181823) | Strange vertical whitespace here... |
| 932–934 ↗ | (On Diff #181823) | Instead of this pattern, I'd suggest early exit: if (!ClWithComdat) {
appendToGlobalCtors(M, cTor, 0);
return;
}
... |