summaryrefslogtreecommitdiff
path: root/lldb/source/Plugins/InstrumentationRuntime
diff options
context:
space:
mode:
authorZachary Turner <zturner@google.com>2016-09-21 16:01:28 +0000
committerZachary Turner <zturner@google.com>2016-09-21 16:01:28 +0000
commitb0753d75da7727c2bb68de4b4bbdd6f5c956f46b (patch)
tree8bccd20094a494428ae2aaa62f88670ed7a5eae3 /lldb/source/Plugins/InstrumentationRuntime
parent2deb41c581d7062626d4beb7f2e942f24425855f (diff)
Make lldb::Regex use StringRef.
This updates getters and setters to use StringRef instead of const char *. I tested the build on Linux, Windows, and OSX and saw no build or test failures. I cannot test any BSD or Android variants, however I expect the required changes to be minimal or non-existant.
Diffstat (limited to 'lldb/source/Plugins/InstrumentationRuntime')
-rw-r--r--lldb/source/Plugins/InstrumentationRuntime/AddressSanitizer/AddressSanitizerRuntime.cpp3
-rw-r--r--lldb/source/Plugins/InstrumentationRuntime/ThreadSanitizer/ThreadSanitizerRuntime.cpp2
2 files changed, 3 insertions, 2 deletions
diff --git a/lldb/source/Plugins/InstrumentationRuntime/AddressSanitizer/AddressSanitizerRuntime.cpp b/lldb/source/Plugins/InstrumentationRuntime/AddressSanitizer/AddressSanitizerRuntime.cpp
index 7b905878a0e..45c26e85edc 100644
--- a/lldb/source/Plugins/InstrumentationRuntime/AddressSanitizer/AddressSanitizerRuntime.cpp
+++ b/lldb/source/Plugins/InstrumentationRuntime/AddressSanitizer/AddressSanitizerRuntime.cpp
@@ -57,7 +57,8 @@ AddressSanitizerRuntime::~AddressSanitizerRuntime() { Deactivate(); }
const RegularExpression &
AddressSanitizerRuntime::GetPatternForRuntimeLibrary() {
// FIXME: This shouldn't include the "dylib" suffix.
- static RegularExpression regex("libclang_rt.asan_(.*)_dynamic\\.dylib");
+ static RegularExpression regex(
+ llvm::StringRef("libclang_rt.asan_(.*)_dynamic\\.dylib"));
return regex;
}
diff --git a/lldb/source/Plugins/InstrumentationRuntime/ThreadSanitizer/ThreadSanitizerRuntime.cpp b/lldb/source/Plugins/InstrumentationRuntime/ThreadSanitizer/ThreadSanitizerRuntime.cpp
index dfac55a4944..c78836a8064 100644
--- a/lldb/source/Plugins/InstrumentationRuntime/ThreadSanitizer/ThreadSanitizerRuntime.cpp
+++ b/lldb/source/Plugins/InstrumentationRuntime/ThreadSanitizer/ThreadSanitizerRuntime.cpp
@@ -832,7 +832,7 @@ bool ThreadSanitizerRuntime::NotifyBreakpointHit(
}
const RegularExpression &ThreadSanitizerRuntime::GetPatternForRuntimeLibrary() {
- static RegularExpression regex("libclang_rt.tsan_");
+ static RegularExpression regex(llvm::StringRef("libclang_rt.tsan_"));
return regex;
}