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/JITLoader | |
| parent | 480bce28ffc4640f443e262fa110af50b0d635df (diff) | |
| download | bcm5719-llvm-0e4c482124f098957fc13bcfbabc36775dd190ab.tar.gz bcm5719-llvm-0e4c482124f098957fc13bcfbabc36775dd190ab.zip | |
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/JITLoader')
| -rw-r--r-- | lldb/source/Plugins/JITLoader/GDB/JITLoaderGDB.cpp | 2 | ||||
| -rw-r--r-- | lldb/source/Plugins/JITLoader/GDB/JITLoaderGDB.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lldb/source/Plugins/JITLoader/GDB/JITLoaderGDB.cpp b/lldb/source/Plugins/JITLoader/GDB/JITLoaderGDB.cpp index 85e54b02a73..a98f8601124 100644 --- a/lldb/source/Plugins/JITLoader/GDB/JITLoaderGDB.cpp +++ b/lldb/source/Plugins/JITLoader/GDB/JITLoaderGDB.cpp @@ -459,7 +459,7 @@ bool JITLoaderGDB::DidSetJITBreakpoint() const { } addr_t JITLoaderGDB::GetSymbolAddress(ModuleList &module_list, - const ConstString &name, + ConstString name, SymbolType symbol_type) const { SymbolContextList target_symbols; Target &target = m_process->GetTarget(); diff --git a/lldb/source/Plugins/JITLoader/GDB/JITLoaderGDB.h b/lldb/source/Plugins/JITLoader/GDB/JITLoaderGDB.h index 17498af83d4..e9938d4c495 100644 --- a/lldb/source/Plugins/JITLoader/GDB/JITLoaderGDB.h +++ b/lldb/source/Plugins/JITLoader/GDB/JITLoaderGDB.h @@ -54,7 +54,7 @@ public: private: lldb::addr_t GetSymbolAddress(lldb_private::ModuleList &module_list, - const lldb_private::ConstString &name, + lldb_private::ConstString name, lldb::SymbolType symbol_type) const; void SetJITBreakpoint(lldb_private::ModuleList &module_list); |

