[Lldb-commits] [lldb] 1bb755f - [lldb][Instrumentation] GetPreferredAsanModule should be no-op on non-Darwin platforms (#132911)

via lldb-commits lldb-commits at lists.llvm.org
Tue Mar 25 08:50:25 PDT 2025


Author: Michael Buch
Date: 2025-03-25T15:50:20Z
New Revision: 1bb755fdcd61695c748d925ee756fc3cba4f15ae

URL: https://github.com/llvm/llvm-project/commit/1bb755fdcd61695c748d925ee756fc3cba4f15ae
DIFF: https://github.com/llvm/llvm-project/commit/1bb755fdcd61695c748d925ee756fc3cba4f15ae.diff

LOG: [lldb][Instrumentation] GetPreferredAsanModule should be no-op on non-Darwin platforms (#132911)

The regex we use to find the compiler-rt library is already
Darwin-specific, so no need to run this on non-Darwin platforms.

Added: 
    

Modified: 
    lldb/source/Plugins/InstrumentationRuntime/Utility/Utility.cpp

Removed: 
    


################################################################################
diff  --git a/lldb/source/Plugins/InstrumentationRuntime/Utility/Utility.cpp b/lldb/source/Plugins/InstrumentationRuntime/Utility/Utility.cpp
index b724083e1e3dd..7fe76a6f0d8ff 100644
--- a/lldb/source/Plugins/InstrumentationRuntime/Utility/Utility.cpp
+++ b/lldb/source/Plugins/InstrumentationRuntime/Utility/Utility.cpp
@@ -14,6 +14,10 @@
 namespace lldb_private {
 
 lldb::ModuleSP GetPreferredAsanModule(const Target &target) {
+  // Currently only supported on Darwin.
+  if (!target.GetArchitecture().GetTriple().isOSDarwin())
+    return nullptr;
+
   lldb::ModuleSP module;
   llvm::Regex pattern(R"(libclang_rt\.asan_.*_dynamic\.dylib)");
   target.GetImages().ForEach([&](const lldb::ModuleSP &m) {


        


More information about the lldb-commits mailing list