kubamracek created this revision. kubamracek added reviewers: jingham, davide, jasonmolenda, aprantl.
https://reviews.llvm.org/D44055 Files: source/Breakpoint/BreakpointID.cpp Index: source/Breakpoint/BreakpointID.cpp =================================================================== --- source/Breakpoint/BreakpointID.cpp +++ source/Breakpoint/BreakpointID.cpp @@ -26,16 +26,14 @@ BreakpointID::~BreakpointID() = default; -static llvm::StringRef g_range_specifiers[] = {"-", "to", "To", "TO"}; - // Tells whether or not STR is valid to use between two strings representing // breakpoint IDs, to // indicate a range of breakpoint IDs. This is broken out into a separate // function so that we can // easily change or add to the format for specifying ID ranges at a later date. bool BreakpointID::IsRangeIdentifier(llvm::StringRef str) { - for (auto spec : g_range_specifiers) { + for (auto spec : GetRangeSpecifiers()) { if (spec == str) return true; } @@ -48,6 +46,7 @@ } llvm::ArrayRef<llvm::StringRef> BreakpointID::GetRangeSpecifiers() { + static llvm::StringRef g_range_specifiers[] = {"-", "to", "To", "TO"}; return llvm::makeArrayRef(g_range_specifiers); }
Index: source/Breakpoint/BreakpointID.cpp =================================================================== --- source/Breakpoint/BreakpointID.cpp +++ source/Breakpoint/BreakpointID.cpp @@ -26,16 +26,14 @@ BreakpointID::~BreakpointID() = default; -static llvm::StringRef g_range_specifiers[] = {"-", "to", "To", "TO"}; - // Tells whether or not STR is valid to use between two strings representing // breakpoint IDs, to // indicate a range of breakpoint IDs. This is broken out into a separate // function so that we can // easily change or add to the format for specifying ID ranges at a later date. bool BreakpointID::IsRangeIdentifier(llvm::StringRef str) { - for (auto spec : g_range_specifiers) { + for (auto spec : GetRangeSpecifiers()) { if (spec == str) return true; } @@ -48,6 +46,7 @@ } llvm::ArrayRef<llvm::StringRef> BreakpointID::GetRangeSpecifiers() { + static llvm::StringRef g_range_specifiers[] = {"-", "to", "To", "TO"}; return llvm::makeArrayRef(g_range_specifiers); }
_______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits