This is an archive of the discontinued LLVM Phabricator instance.

[clang][NFC] Small mangler cleanups
ClosedPublic

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

Details

Summary

In working on a module mangling problem I noticed a few cleanups to the mangler.

  1. Use 'if (auto x = ...' idiom in a couple of places.
  1. I noticed both 'isFileContext' and 'isNamespace || isTranslationUnit' synonyms. Let's use the former.
  1. The control flow in the seqId mangling was misordered. Let's channel Count von Count. Also fix the inconsistent bracing.

Diff Detail

Event Timeline

urnathan requested review of this revision.Jan 20 2022, 9:10 AM
urnathan created this revision.
aaron.ballman accepted this revision.Jan 20 2022, 9:33 AM

LGTM aside from a few style nits.

clang/lib/AST/ItaniumMangle.cpp
662
698
This revision is now accepted and ready to land.Jan 20 2022, 9:33 AM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptJan 20 2022, 11:20 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript