Skip to content

Commit 1bb755f

Browse files
authored
[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.
1 parent 70aeb89 commit 1bb755f

File tree

1 file changed

+4
-0
lines changed
  • lldb/source/Plugins/InstrumentationRuntime/Utility

1 file changed

+4
-0
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@
1414
namespace lldb_private {
1515

1616
lldb::ModuleSP GetPreferredAsanModule(const Target &target) {
17+
// Currently only supported on Darwin.
18+
if (!target.GetArchitecture().GetTriple().isOSDarwin())
19+
return nullptr;
20+
1721
lldb::ModuleSP module;
1822
llvm::Regex pattern(R"(libclang_rt\.asan_.*_dynamic\.dylib)");
1923
target.GetImages().ForEach([&](const lldb::ModuleSP &m) {

0 commit comments

Comments
 (0)