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) {


        
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to