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/Core/ValueObjectChild.cpp | |
| 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/Core/ValueObjectChild.cpp')
| -rw-r--r-- | lldb/source/Core/ValueObjectChild.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lldb/source/Core/ValueObjectChild.cpp b/lldb/source/Core/ValueObjectChild.cpp index e12ed57b9edc..01f2e20dd0bc 100644 --- a/lldb/source/Core/ValueObjectChild.cpp +++ b/lldb/source/Core/ValueObjectChild.cpp @@ -28,7 +28,7 @@ using namespace lldb_private; ValueObjectChild::ValueObjectChild( ValueObject &parent, const CompilerType &compiler_type, - const ConstString &name, uint64_t byte_size, int32_t byte_offset, + ConstString name, uint64_t byte_size, int32_t byte_offset, uint32_t bitfield_bit_size, uint32_t bitfield_bit_offset, bool is_base_class, bool is_deref_of_parent, AddressType child_ptr_or_ref_addr_type, uint64_t language_flags) |
