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/SymbolFile/DWARF/NameToDIE.h | |
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/SymbolFile/DWARF/NameToDIE.h')
-rw-r--r-- | lldb/source/Plugins/SymbolFile/DWARF/NameToDIE.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/NameToDIE.h b/lldb/source/Plugins/SymbolFile/DWARF/NameToDIE.h index e969f27e348..2d7b4605247 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/NameToDIE.h +++ b/lldb/source/Plugins/SymbolFile/DWARF/NameToDIE.h @@ -26,13 +26,13 @@ public: void Dump(lldb_private::Stream *s); - void Insert(const lldb_private::ConstString &name, const DIERef &die_ref); + void Insert(lldb_private::ConstString name, const DIERef &die_ref); void Append(const NameToDIE &other); void Finalize(); - size_t Find(const lldb_private::ConstString &name, + size_t Find(lldb_private::ConstString name, DIEArray &info_array) const; size_t Find(const lldb_private::RegularExpression ®ex, |