[PATCH] D49292: [MSan] factor userspace-specific declarations into createUserspaceApi(). NFC

Alexander Potapenko via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 13 10:02:12 PDT 2018


glider added inline comments.


================
Comment at: lib/Transforms/Instrumentation/MemorySanitizer.cpp:593
+  // Only do this once.
+  static bool CallbacksInitialized = false;
+  if (CallbacksInitialized)
----------------
eugenis wrote:
> This should probably be a property of a module, not a compiler invocation.
> 
We used to check for WarningFn value here, and are just using a special bool instead now.
It might be cleaner to make CallbacksInitialized a property of `class MemorySanitizer`, but how can it be a property of a module?


Repository:
  rL LLVM

https://reviews.llvm.org/D49292





More information about the llvm-commits mailing list