This is an archive of the discontinued LLVM Phabricator instance.

[demangler][NFC] Small cleanups and sync
ClosedPublic

Authored by urnathan on Jan 20 2022, 9:12 AM.

Details

Summary

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?

Diff Detail

Event Timeline

urnathan requested review of this revision.Jan 20 2022, 9:12 AM
urnathan created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptJan 20 2022, 9:12 AM
aaron.ballman accepted this revision.Jan 20 2022, 10:13 AM

LGTM!

Symlinks would be simplest to achieve that, but I don't think they're available on all file systems being built on?

I don't know how well that solution will work on Windows.

This revision is now accepted and ready to land.Jan 20 2022, 10:13 AM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptJan 20 2022, 11:47 AM
Herald added a reviewer: Restricted Project. · View Herald Transcript