[PATCH] D56516: [SanitizerCoverage] Don't create comdat for weak functions.

Reid Kleckner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 15 13:15:52 PST 2019


rnk accepted this revision.
rnk added a comment.
This revision is now accepted and ready to land.

In D56516#1358544 <https://reviews.llvm.org/D56516#1358544>, @morehouse wrote:

> In my local tests, the weak function and its sancov metadata both get discarded with bfd, gold, and lld.


Great! This looks good to me, but maybe ask @pcc his opinion before landing.



================
Comment at: llvm/test/Instrumentation/SanitizerCoverage/interposable-symbol-nocomdat.ll:2-4
+; RUN: opt < %s -sancov -sanitizer-coverage-level=3 -sanitizer-coverage-trace-pc-guard -S | FileCheck %s
+target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target triple = "x86_64-unknown-linux-gnu"
----------------
I think we should run this test for COFF targets as well, since this is an intentional change there. You can remove the target* lines and use two RUN: lines with `-mtriple x86_64-linux-gnu` and `-mtriple x86_64-windows-msvc`.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D56516/new/

https://reviews.llvm.org/D56516





More information about the llvm-commits mailing list