[demangler] Buffer peeking needs buffer
authorNathan Sidwell <nathan@acm.org>
Mon, 28 Mar 2022 19:38:48 +0000 (12:38 -0700)
committerNathan Sidwell <nathan@acm.org>
Mon, 9 May 2022 11:17:22 +0000 (04:17 -0700)
commite48cd7088b736dae5cd572ebb58963c70a4a72b8
tree7f756d86c0d9b61a5919cc401973342ca28d1fc0
parent8a92c45e07dc81c83ca3afda3971d98c512429d4
[demangler] Buffer peeking needs buffer

The output buffer has a 'back' member, which returns NUL when you try
it with an empty buffer.  But there are no use cases that need that
additional functionality.  This makes the 'back' member behave more
like STL containers' back members.  (It still returns a value, not a
reference.)

Reviewed By: dblaikie

Differential Revision: https://reviews.llvm.org/D123201
libcxxabi/src/demangle/Utility.h
llvm/include/llvm/Demangle/Utility.h