[PATCH] D117800: [demangler][NFC] Small cleanups and sync
Nathan Sidwell via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 20 09:12:59 PST 2022
urnathan created this revision.
urnathan added reviewers: bruno, aaron.ballman, rsmith, ChuanqiXu.
urnathan requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
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. AFAICT there is no need for the different header protection macros. Perhaps, now this is a monorepo we can elide the need for a copy. Symlinks would be simplest to achieve that, but I don't think they're available on all file systems being built on?
https://reviews.llvm.org/D117800
Files:
libcxxabi/src/demangle/ItaniumDemangle.h
llvm/include/llvm/Demangle/ItaniumDemangle.h
llvm/include/llvm/Demangle/StringView.h
llvm/include/llvm/Demangle/Utility.h
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D117800.401664.patch
Type: text/x-patch
Size: 4053 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220120/61ed245f/attachment.bin>
More information about the llvm-commits
mailing list