diff options
| author | Adrian Prantl <aprantl@apple.com> | 2019-03-06 21:22:25 +0000 |
|---|---|---|
| committer | Adrian Prantl <aprantl@apple.com> | 2019-03-06 21:22:25 +0000 |
| commit | 0e4c482124f098957fc13bcfbabc36775dd190ab (patch) | |
| tree | 34ee130b6d6de0d41a229021c4b46ab66b891a08 /lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h | |
| parent | 480bce28ffc4640f443e262fa110af50b0d635df (diff) | |
Pass ConstString by value (NFC)
My apologies for the large patch. With the exception of ConstString.h
itself it was entirely produced by sed.
ConstString has exactly one const char * data member, so passing a
ConstString by reference is not any more efficient than copying it by
value. In both cases a single pointer is passed. But passing it by
value makes it harder to accidentally return the address of a local
object.
(This fixes rdar://problem/48640859 for the Apple folks)
Differential Revision: https://reviews.llvm.org/D59030
llvm-svn: 355553
Diffstat (limited to 'lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h')
| -rw-r--r-- | lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h b/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h index 71d726097f89..d416b9232861 100644 --- a/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h +++ b/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h @@ -245,7 +245,7 @@ typedef std::vector<RSScriptGroupDescriptorSP> RSScriptGroupList; class RSScriptGroupBreakpointResolver : public BreakpointResolver { public: - RSScriptGroupBreakpointResolver(Breakpoint *bp, const ConstString &name, + RSScriptGroupBreakpointResolver(Breakpoint *bp, ConstString name, const RSScriptGroupList &groups, bool stop_on_all) : BreakpointResolver(bp, BreakpointResolver::NameResolver), @@ -275,7 +275,7 @@ public: protected: const RSScriptGroupDescriptorSP - FindScriptGroup(const ConstString &name) const { + FindScriptGroup(ConstString name) const { for (auto sg : m_script_groups) { if (ConstString::Compare(sg->m_name, name) == 0) return sg; @@ -365,7 +365,7 @@ public: int kernel_types = ~(0)); bool PlaceBreakpointOnScriptGroup(lldb::TargetSP target, Stream &strm, - const ConstString &name, bool stop_on_all); + ConstString name, bool stop_on_all); void SetBreakAllKernels(bool do_break, lldb::TargetSP target); @@ -387,7 +387,7 @@ public: return m_scriptGroups; }; - bool IsKnownKernel(const ConstString &name) { + bool IsKnownKernel(ConstString name) { for (const auto &module : m_rsmodules) for (const auto &kernel : module->m_kernels) if (kernel.m_name == name) @@ -428,12 +428,12 @@ protected: bool EvalRSExpression(const char *expression, StackFrame *frame_ptr, uint64_t *result); - lldb::BreakpointSP CreateScriptGroupBreakpoint(const ConstString &name, + lldb::BreakpointSP CreateScriptGroupBreakpoint(ConstString name, bool multi); - lldb::BreakpointSP CreateKernelBreakpoint(const ConstString &name); + lldb::BreakpointSP CreateKernelBreakpoint(ConstString name); - lldb::BreakpointSP CreateReductionBreakpoint(const ConstString &name, + lldb::BreakpointSP CreateReductionBreakpoint(ConstString name, int kernel_types); void BreakOnModuleKernels( |
