[PATCH] D72887: [lsan] Support LeakSanitizer runtime on Fuchsia

Roland McGrath via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 27 13:38:56 PST 2020


mcgrathr marked 2 inline comments as done.
mcgrathr added inline comments.


================
Comment at: compiler-rt/lib/lsan/lsan_common.cpp:539
+
 static void ReportIfNotSuspended(ThreadContextBase *tctx, void *arg) {
   const InternalMmapVector<tid_t> &suspended_threads =
----------------
vitalybuka wrote:
> here and "ProcessThreads"
> if this compile can you remove #ifdef and just add USED to supress warnings?
> 
I moved ReportIfNotSuspended out of the #if check and that compiles fine (we're not building with -Wunused-functions, so UNUSED is unnecessary--USED would be wrong here).  It's not possible to reuse the ReportUnsuspendedThreads or ProcessThreads code on Fuchsia because SuspendedThreadsList doesn't implement any of the methods.  It would be useless code on Fuchsia that wouldn't be compiled away too, since the compiler can't tell here that the thread list is always empty.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D72887





More information about the llvm-commits mailing list