[demangler][NFC] Small cleanups and sync
authorNathan Sidwell <nathan@acm.org>
Thu, 20 Jan 2022 15:40:12 +0000 (07:40 -0800)
committerNathan Sidwell <nathan@acm.org>
Thu, 20 Jan 2022 19:47:06 +0000 (11:47 -0800)
commit8105e404f186c6f31e08185b37f81e6da904f6d7
treec198eff51b094f98cee09afd99768b58b6647fc8
parentba8eb31bd9542828f6424e15a3014f80f14522c8
[demangler][NFC] Small cleanups and sync

Some precursor work to adding module demangling.

* some mismatched comment and code in the demangler

* a const fn was not marked thusly

* we use std::islower.  A direct range check is smaller code (no function call),
  and we know we're in ASCII-land and later in that same function make the same
  assumption about upper-case contiguity.  Heck, maybe just drop the switch's
  precondition and rely on the optimizer to do its thing?

* the directory is cloned in two places, which had gotten out of sync.

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