[PATCH] D28434: [Sanitizer Coverage] Fix Instrumentation to work on Windows.

Reid Kleckner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 9 13:18:28 PST 2017


rnk added inline comments.


================
Comment at: lib/Transforms/Instrumentation/SanitizerCoverage.cpp:372-387
+      GlobalVariable *SectionStart, *SectionStop;
+      SectionStart = new GlobalVariable(M, Int32PtrTy, false,
+          GlobalVariable::ExternalLinkage, nullptr,
+          SanCovTracePCGuardSectionStart);
+      SectionStart->setVisibility(GlobalValue::HiddenVisibility);
+      SectionStop = new GlobalVariable(M, Int32PtrTy, false,
+          GlobalVariable::ExternalLinkage, nullptr,
----------------
I don't think we need this dynamic initialization in every TU on Windows. If ___start___sancov_guard is linked statically into every DLL, we can add code to that object file to call __sanitizer_cov_trace_pc_guard_init on Windows.


Repository:
  rL LLVM

https://reviews.llvm.org/D28434





More information about the llvm-commits mailing list